using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using TellerSystem.ServiceProxy.Ext.ServiceHelper;
using TellerSystem.Library.Ext.Function;
using TellerSystem.ServiceProxy.Ext;
using Platform.Common.RunningParameters;
using TellerSystem.Library.Ext.Variables;
using System.Windows;
namespace TellerSystem.Contract.Function
{
    /// <summary>
    /// 查询存款账户信息
    /// 通过账号查询账户信息
    /// </summary>
    public class QueryDepositAccount : TFOutput
    {
        #region Output
        /// <summary>
        /// 开户机构 0020
        /// 
        /// </summary>
        public string KHJG { get; internal set; }
        /// <summary>
        /// 开户机构名称0810
        /// </summary>
        public string KHJGMC { get; internal set; }
        /// <summary>
        /// 介质级别 0210
        /// 
        /// </summary>
        public string JZJB { get; internal set; }

        /// <summary>
        /// 科目借贷属性 0220
        /// 借/贷
        /// </summary>
        public string KMJDSX { get; internal set; }

        /// <summary>
        /// 介质名称 0250
        /// 
        /// </summary>
        public string JZMC { get; internal set; }

        /// <summary>
        /// 记录老账号 0300
        /// 
        /// </summary>
        public string LZH { get; internal set; }

        /// <summary>
        /// 扣划金额 0390
        /// 
        /// </summary>
        public string KHJE { get; internal set; }

        /// <summary>
        /// 集团签约当日透支额度 0400
        /// 
        /// </summary>
        public string JTQYDRTZED { get; internal set; }

        /// <summary>
        /// 集团签约留存额度 0410
        /// 
        /// </summary>
        public string JTQYLCED { get; internal set; }

        /// <summary>
        /// 当日取款金额 0420
        /// 
        /// </summary>
        public string DRQKJE { get; internal set; }

        /// <summary>
        /// 签约控制金额 0430
        /// 
        /// </summary>
        public string QYKZJE { get; internal set; }

        /// <summary>
        /// 转久悬的最后日期 0440
        /// 
        /// </summary>
        public string ZJXDZHRQ { get; internal set; }
        /// <summary>
        /// 支付起始日期 0460
        /// 
        /// </summary>
        public string ZFQSRQ { get; internal set; }

        /// <summary>
        /// 补登条数 0520
        /// 
        /// </summary>
        public string BDTS { get; internal set; }

        /// <summary>
        /// AC_ID 0530
        /// 
        /// </summary>
        public string AC_ID { get; internal set; }

        /// <summary>
        /// 冻结止付合计数 0540
        /// 
        /// </summary>
        public string DJZFHJS { get; internal set; }

        /// <summary>
        /// 利息积数 0560
        /// 
        /// </summary>
        public string LXJS { get; internal set; }

        /// <summary>
        /// 密码 0610
        /// 
        /// </summary>
        public string MM { get; internal set; }

        /// <summary>
        /// 客户证件号 0620
        /// 客户证件号，客户证件跟账户证件不一致时，需要提示做账户或客户信息维护交易
        /// </summary>
        public string ZJH { get; internal set; }

        /// <summary>
        /// 签约控制金额协议书号 0630
        /// 
        /// </summary>
        public string QYKZJEXYSH { get; internal set; }

        /// <summary>
        /// 科目号 0640
        /// 
        /// </summary>
        public string KMH { get; internal set; }

        /// <summary>
        /// 上级科目控制器 0650
        /// 
        /// </summary>
        public string SJKMKZQ { get; internal set; }

        /// <summary>
        /// 内部户的定期活期标志 0720
        /// 1活期 2定期
        /// </summary>
        public string NBHDDQHQBZ { get; internal set; }

        /// <summary>
        /// 标志位 0740
        /// [空格表示没有查询相关数据]第1位：是否签约理财业务[1:已签约2:未签约] 第2位：主附卡标志[1：主卡2：附卡3：E卡通] 第3位：是否做过附卡限额控制[1:已做2:未做] 第4位：是否做过抵质押品登记[1:已登记2:未登记] 第5位：是否做过理财签约[1:已签约2:未签约] 第6位：是否做过贷款关联[1:已关联2:未关联] 第7位：挂失状态[1：口挂2：书挂3：密挂4：密挂兼书挂 5：印挂N：未挂失] 第8位：规则校验[1：成功2：失败] 第9位：是否单账户介质[Y：是N：否] 第10位：卡种类[0 普通卡；1 联名卡；2 专用卡] 第11位：证实书是否已置换存单[1：已置换2：未置换] 第12位：客户级别参见cif_basic_inf中的cif_lvl 第13位：是否需要转久悬[1：需要2：不需要] 第14位：是否需要补登存折[1：需要2：不需要] 第15位：是否签约控制金额[0:已签约1:未签约] 第16位：是否签约集团账户主账户[1：已签约2：未签约] 第17位：活期取现标志[Y：允许N：不允许] 第18位：介质种类参见mdm_attr表mdm_type 第19位：是否记名卡参见mdm_attr表Card_ind 第20位：教育位：零整是否超期[1：已超期2：未超期] 第21位：部分提前支取标志[Y：允许N：不允许 Td_parm中wdr_ind] 第22位：是否部提超限[1：已超限2：未超限] 第23位：通知存款支取类型参见mo_infrm中sts字段 第24位：定期预约转存标志参见td_mst表tfr_ind[Y:是 N:否] 第25位：登记久悬标志[A:正常账户N:久悬,X:损益,Y:已支取] 第26位：是否已满折[1：已满2：未满] 第27位：是否签约个体工商户[1：已签约2：未签约] 第28位：是否同业定期存放标志[Y是 N否] 第29位:同业存放定期账号能否存入标志[Y是 N否]第30位：是否签约授信贷款[1:已签约，2:未签约]第31位：交易密码状态[0:正常，1:未设置密码或未找到密码状态，2:当日密码锁定，3:累积密码锁定，4:密码为初始状态]第32位：是否签约巧得利[0:未签约 1已签约 *已取消]第33位：书挂申请书状态[0：正常 1：挂失]第34位：密挂申请书状态[0：正常 1：挂失] 第35位：账户种类[1活期 2定期 3贷款 9内部]第36位：是否有定期户(活期账户用)[0:没有 1有定期]第37位: 0-表内，1，表外 第38位：是否在开户确认止付期内[0-否 1-是]第39位：是否开通协定存款[0-否 1-是]第40位：是否为参数配置（com_parm）[N:否 Y:是] 第41位是否已关联代理信息[Y:是 N:否] 第42位：该介质是否对账折 [N:否 Y:是]第43位：该分户是否存在多个未销户的介质 [N:否 Y:是]第44位:验资户标志[1:普通户 2:验资户 3:增资户]第46位:客户信息与证件信息是否一直[Y-一致  N-不一致]第47位:是否揽存备案[Y:是(需要控制取款),N:否]第48位:是否卡折一体[Y:是,N:否]第49位:零整自扣签约[0:未签约,1:主账户,2:从账户]
        /// </summary>
        public string BZW { get; internal set; }

        /// <summary>
        /// 利率 0840
        /// 
        /// </summary>
        public string LL { get; internal set; }

        /// <summary>
        /// 开户行号 0910
        /// 
        /// </summary>
        public string KHXH { get; internal set; }

        /// <summary>
        /// 活期提现标志 0930
        /// Y允许 N不允许
        /// </summary>
        public string HQTXBZ { get; internal set; }

        /// <summary>
        /// 定额还款金额 1001
        /// 
        /// </summary>
        public string DEHKJE { get; internal set; }

        /// <summary>
        /// 可用余额 1002
        /// 
        /// </summary>
        public string KYYE { get; internal set; }

        /// <summary>
        /// 已转久悬金额 1003
        /// 
        /// </summary>
        public string YZJXJE { get; internal set; }

        /// <summary>
        /// 当日累计金额 100A
        /// 
        /// </summary>
        public string DRLJJE { get; internal set; }

        /// <summary>
        /// 处理旧帐号 1021
        /// 
        /// </summary>
        public string CLJZH { get; internal set; }

        /// <summary>
        /// 序号 1022
        /// 
        /// </summary>
        public string XH { get; internal set; }

        /// <summary>
        /// 凭证种类 1023
        /// 
        /// </summary>
        public string PZZL { get; internal set; }

        /// <summary>
        /// 凭证号 1024
        /// 
        /// </summary>
        public string PZH { get; internal set; }

        /// <summary>
        /// 是否任意支取 1025
        /// Y：是；N：否 如果是凭密或凭证件支取则此处为N
        /// </summary>
        public string SFRYZQ { get; internal set; }

        /// <summary>
        /// 是否凭密 1026
        /// Y：是；N：否
        /// </summary>
        public string SFPM { get; internal set; }

        /// <summary>
        /// 是否凭证件支取 1029
        /// Y：是；N：否
        /// </summary>
        public string SFPZJZQ { get; internal set; }

        /// <summary>
        /// 证件号码 102A
        /// 账户证件号，客户证件跟账户证件不一致时，需要提示做账户或客户信息维护交易
        /// </summary>
        public string ZJHM { get; internal set; }

        /// <summary>
        /// 是否凭印鉴支取 102B
        /// Y：是；N：否；T：卡折双开（个人，当作否处理）
        /// </summary>
        public string SFPYJZQ { get; internal set; }

        /// <summary>
        /// 是否支付密码器 102C
        /// Y：是；N：否
        /// </summary>
        public string SFZFMMQ { get; internal set; }

        /// <summary>
        /// 证件类型 102G
        /// 账户证件类型，客户证件跟账户证件不一致时，需要提示做账户或客户信息维护交易
        /// </summary>
        public string ZJLX { get; internal set; }

        /// <summary>
        /// 账户名 102H
        /// 对公客户名加后缀作为账户名
        /// </summary>
        public string HM { get; internal set; }

        /// <summary>
        /// 余额 102I
        /// 
        /// </summary>
        public string YE { get; internal set; }

        /// <summary>
        /// 币种 102J
        /// 
        /// </summary>
        public string BZ { get; internal set; }

        /// <summary>
        /// 账号类型 102M
        /// 0：科目 1：活期；2：定期；3：贷款；4：透支；9：资金(内部账)
        /// </summary>
        public string ZHLX { get; internal set; }

        /// <summary>
        /// 利率类型 102O
        /// 
        /// </summary>
        public string LLLX { get; internal set; }

        /// <summary>
        /// 印鉴号 102T
        /// 
        /// </summary>
        public string YJH { get; internal set; }

        /// <summary>
        /// 产品名称 102V
        /// 
        /// </summary>
        public string CPMC { get; internal set; }

        /// <summary>
        /// 主账户 102W
        /// 附属卡、一卡通、对公一户通对应的主账号
        /// </summary>
        public string YHTZZH { get; internal set; }

        /// <summary>
        /// 介质种类 102Z
        /// 
        /// </summary>
        public string JZZL { get; internal set; }

        /// <summary>
        /// 客户号 1051
        /// 
        /// </summary>
        public string KHH { get; internal set; }

        /// <summary>
        /// 产品号 1052
        /// 
        /// </summary>
        public string CPH { get; internal set; }

        /// <summary>
        /// 开户日期 1053
        /// 
        /// </summary>
        public string KHRQ { get; internal set; }

        /// <summary>
        /// 到期日期 1054
        /// 
        /// </summary>
        public string DQRQ { get; internal set; }

        /// <summary>
        /// 计息日期 1055
        /// 
        /// </summary>
        public string JXRQ { get; internal set; }

        /// <summary>
        /// 最后一笔发生日期 1056
        /// 
        /// </summary>
        public string ZHYBFSRQ { get; internal set; }

        /// <summary>
        /// 介质状态 1057
        /// 0正常 1挂失 2挂失换证 3正常换证 4已经部提 5撤销 *销户 6损坏更换
        /// </summary>
        public string JZZT { get; internal set; }

        /// <summary>
        /// 账户状态 1058
        /// 1：正常；0：开户待确认；3：挂失结清；4：开户更正；5：临时销户；6：转久悬；*：销户；#计息结束
        /// </summary>
        public string ZHZT { get; internal set; }

        /// <summary>
        /// 账户冻结状态 1059
        /// 0正常 1完全冻结 2只进不出 3部分冻结
        /// </summary>
        public string ZHDJZT { get; internal set; }

        /// <summary>
        /// 账户止付状态 105A
        /// 0正常 1全部止付 2只进不出 3部分止付
        /// </summary>
        public string ZHZFZT { get; internal set; }

        /// <summary>
        /// 冻结金额 105B
        /// 
        /// </summary>
        public string DJJE { get; internal set; }

        /// <summary>
        /// 止付金额 105C
        /// 
        /// </summary>
        public string ZFJE { get; internal set; }

        /// <summary>
        /// 定期存款类型 105D
        /// 0整存整取 1零存整取 2整存零取 3存本取息 4通知存款 5协议存款 6定活两便 7教育储蓄 A利润最大化通知存款 B:个人大额储蓄
        /// </summary>
        public string DQCKLX { get; internal set; }

        /// <summary>
        /// 控制金额 105E
        /// 
        /// </summary>
        public string KZJE { get; internal set; }

        /// <summary>
        /// 结算类型 105F
        /// D结算 S非结算
        /// </summary>
        public string JSLX { get; internal set; }

        /// <summary>
        /// 账户类型 105G
        /// 1：基本户；2：一般户；3：专用存款户；4：临时存款户；5：个人存款户（储蓄户）；6：协定（理财）户；7：公积金活期户（个人）
        /// </summary>
        public string ZHLX_1 { get; internal set; }

        /// <summary>
        /// 定向标志 105H
        /// 0 专用 1  定向 2 共用
        /// </summary>
        public string DXBZ { get; internal set; }
        /// <summary>
        /// 开通标志 105K
        /// [空格表示没有查询相关数据]第一位:表示二级账户标志  第二位：电话银行  第三位：支付系统通存通兑标志  第五位：行内通存通兑标志0:不开通 1:通存通兑 2:通存不通兑 第六位：卡自动转账开通标志  0:不开通 1:通存通兑 第七位：卡ATM开通标志 0:不开通 1:通存通兑 
        /// </summary>
        public string KTBZ { get; internal set; }

        /// <summary>
        /// 最小开户金额 105L
        /// 
        /// </summary>
        public string ZXKHJE { get; internal set; }

        /// <summary>
        /// 最低留存金额 105M
        /// 
        /// </summary>
        public string ZDLCJE { get; internal set; }

        /// <summary>
        /// 特殊定期交易金额 105N
        /// 
        /// </summary>
        public string TSDQJYJE { get; internal set; }

        /// <summary>
        /// 客户类型 107K
        /// 0公用 1个人 2公司 3机构（指政府机关等组织） 4金融同业 5内部员工 6金融机构
        /// </summary>
        public string KHLX { get; internal set; }

        /// <summary>
        /// 计息类型 1125
        /// 0不计息 1利随本清 2按日计息 3按月计息 4按季计息 5按年计息
        /// </summary>
        public string JXLX { get; internal set; }

        /// <summary>
        /// 账号 0300
        /// 
        /// </summary>
        public string ZH { get; internal set; }

        /// <summary>
        /// 是否签约集团二级账户 0700
        /// 1已签约 2未签约
        /// </summary>
        public string SFEJZH { get; internal set; }

        /// <summary>
        /// 计划扣划未扣划总额 1004
        /// 
        /// </summary>
        public string WKHZE { get; internal set; }

        /// <summary>
        /// 附属卡数量 0500
        /// 
        /// </summary>
        public string FSKSL { get; internal set; }

        /// <summary>
        /// 子卡数量 0510
        /// 子卡数量(未销户)
        /// </summary>
        public string ZKSL { get; internal set; }

        /// <summary>
        /// 已发生次数 0550
        /// 零整已续存次数、整零已取款次数、存本取息已取息次数(开户次月就取利息，取息日距开户日相隔月数-已取息次数=还可取息次数)、整整已部提次数、自动转存次数
        /// </summary>
        public string YFSCS { get; internal set; }

        /// <summary>
        /// 客户名称 0260
        /// 对公客户名加后缀作为账户名
        /// </summary>
        public string KHMC { get; internal set; }

        /// <summary>
        /// 介质到期日 0450
        /// 
        /// </summary>
        public string JZDQR { get; internal set; }

        /// <summary>
        /// 对方账号 0310
        /// 定期账户开户时的转账账号、协定存款从账号
        /// </summary>
        public string DFZH { get; internal set; }

        /// <summary>
        /// 协定存款从账号  0330
        /// 协定存款从账号
        /// </summary>
        public string XDZH { get; internal set; }
        /// <summary>
        /// 原凭证号 0580
        /// 对公定期存单对应的证实书凭证号
        /// </summary>
        public string YPZH { get; internal set; }

        /// <summary>
        /// 利率浮动比例 0850
        /// 例如：10%  表示为 0.1，使用时需要 (1+x)*100%
        /// </summary>
        public string LLFDBL { get; internal set; }

        /// <summary>
        /// 机构信用代码证号 107D
        /// 
        /// </summary>
        public string JGXYDMZH { get; internal set; }

        /// <summary>
        /// 客户证件类型 1158
        /// 客户证件跟账户证件不一致时，需要提示做账户或客户信息维护交易
        /// </summary>
        public string KHZJLX { get; internal set; }

        /// <summary>
        /// 对账折凭证号码 108D
        /// 
        /// </summary>
        public string DZZHM { get; internal set; }

        /// <summary>
        /// 收息账号 0320
        /// </summary>
        public string SXZH { get; internal set; }

        /// <summary>
        /// 序号 103G
        ///  自动转存标志 Y 允许  N 不允许
        /// </summary>
        public string ZCBZ { get; set; }
        /// <summary>
        /// 介质扩展状态 0590
        /// 第1位：已不用；第2位：单笔/批量开户标志；第3位：强弱实名账户标志；第4位：共管户标志；第5位：可否现金记账、综合记账；
        /// </summary>
        public string JZKZZT { get; internal set; }
        /// <summary>
        /// 公共属性(可修改值)
        /// </summary>
        public string GGSX { get; set; }
        /// <summary>
        /// 证件有效期 0470
        /// </summary>
        public string ZJYXQ { get; set; }
        /// <summary>
        /// 二三类账户标志
        /// </summary>
        public string ESLBZ { get; set; }
        /// <summary>
        /// 是否取现
        /// </summary>
        public string SFQX { get; set; }
        /// <summary>
        /// 日累计取现金额
        /// </summary>
        public string QKXE_ZM { get; set; }
        /// <summary>
        /// 日累计转账金额
        /// </summary>
        public string QKXE_ZZ { get; set; }
        /// <summary>
        /// 客户性别
        /// </summary>
        public string XB { get; set; }
        /// <summary>
        /// 客户国籍
        /// </summary>
        public string GJ { get; set; }
        /// <summary>
        /// 联系方式-手机号
        /// </summary>
        public string PHONE { get; set; }
        /// <summary>
        /// 联系方式-固定电话
        /// </summary>
        public string TELEPHONE { get; set; }
        /// <summary>
        /// 地址
        /// </summary>
        public string ADDRESS { get; set; }
        /// <summary>
        /// 单位地址
        /// </summary>
        public string COMADDRESS { get; set; }
        /// <summary>
        /// 证件起始日期
        /// </summary>
        public string ZJQSRQ { get; set; }
        /// <summary>
        /// 入息账号
        /// </summary>
        public string RXZH { get; set; }
        /// <summary>
        /// 96_1 中牟-七天乐理财产品 产品名
        /// </summary>
        public string LCCPMC { get; set; }
        /// <summary>
        /// 103_C 中牟-七天乐理财产品 存期类型
        /// </summary>
        public string LCCPCQLX { get; set; }
        /// <summary>
        /// 66 中牟-七天乐理财产品 是否签约 1-签约
        /// </summary>
        public string LCCPSF { get; set; }
        /// <summary>
        /// 天骄，七日盈可用余额
        /// </summary>
        public string QRYYE { get; set; }
        /// <summary>
        /// 最低取款金额  1244
        /// </summary>
        public string ZDQKJE { get; set; }
        /// <summary>
        /// 最低续存金额  1246
        /// </summary>
        public string ZDXCJE { get; set; }
        /// <summary>
        /// 单位倍数金额  1248
        /// </summary>
        public string DWBSJE { get; set; }
        /// <summary>
        /// 职业分类
        /// </summary>
        public string ZYFL { get; set; }
        /// <summary>
        /// I II III类账户升降级次数 0350
        /// </summary>
        public string SJJCS { get; set; }
        /// <summary>
        /// 冻结记录数 0360
        /// </summary>
        public string DJJLS { get; set; }
        /// <summary>
        /// 止付记录数 0480
        /// </summary>
        public string ZFJLS { get; set; }
        /// <summary>
        /// 82域标志
        /// </summary>
        public string MARK { get; set; }
        #endregion

        #region Input
        /// <summary>
        /// 参数清单
        /// </summary>
        public class Input : TFInput
        {
            /// <summary>
            /// 账号 0300
            /// 可输入科目号 
            /// </summary>
            public string ZH { get; set; }

            /// <summary>
            /// 序号 0340
            ///  
            /// </summary>
            public string XH { get; set; }
            /// <summary>
            /// 入账机构号
            ///  
            /// </summary>
            public string JGH { get; set; }
            /// <summary>
            /// 版本控制标志
            /// </summary>
            private string flag = TradeManagerHandle.TT_SYSCONFIG_GetConfigValueByConfigID("2ea3a7e6cfa04f89a335bf1e363295de");
            /// <summary>
            /// 授信标志1149
            /// 传1方大,tianjiao
            /// </summary>
            public string SXBZ { get; set; }
            /// <summary>
            /// 是否提示 1标志该交易需要提示客户信息完整性， 其他标志不提示
            /// </summary>
            public string SFTS { get; set; }
            /// <summary>
            /// 是否无需限制交易继续（如证件有效期已过期个别场景无需限制） Y不限制
            /// </summary>
            public string SFXZ { get; set; }
            /// <summary>                 
            /// 定义业务逻辑              
            /// </summary>                
            /// <returns></returns>  
            public override TFOutput Raise()
            {
                //拉取数据                                  
                var output = new QueryDepositAccount();
                PageData.TradeAPIs.InitFd(MessageData);
                PageData.TradeAPIs.CommSend(MessageData);
                MessageData.Fd126_5 = MainCode;
                MessageData.Fd16 = "K025";
                MessageData.Fd30 = ZH;
                MessageData.Fd34 = XH;
                MessageData.Fd91 = JGH;
                if (flag == "V21" || flag == "V22" || flag == "V19")
                {
                    MessageData.Fd114_9 = SXBZ;
                }

                PageData.TradeAPIs.CallServer(MessageData);
                if (MessageData.Fd12 != "0000")
                {
                    output.IsFailed = true;
                    output.FailureCause = PageData.TradeAPIs.GetError(MessageData);
                }
                output.KHJG = DelSpace(MessageData.Fd2);
                output.KHJGMC = DelSpace(MessageData.Fd81);
                output.JZJB = DelSpace(MessageData.Fd21);
                output.KMJDSX = DelSpace(MessageData.Fd22);
                output.JZMC = DelSpace(MessageData.Fd25);
                output.LZH = DelSpace(MessageData.Fd31);
                output.KHJE = DelSpace(MessageData.Fd39);
                output.JTQYDRTZED = DelSpace(MessageData.Fd40);
                output.JTQYLCED = DelSpace(MessageData.Fd41);
                output.DRQKJE = DelSpace(MessageData.Fd42);
                output.QYKZJE = DelSpace(MessageData.Fd43);
                output.ZJXDZHRQ = DelSpace(MessageData.Fd44);
                output.ZFQSRQ = DelSpace(MessageData.Fd46);
                output.BDTS = DelSpace(MessageData.Fd52);
                output.AC_ID = DelSpace(MessageData.Fd53);
                output.DJZFHJS = DelSpace(MessageData.Fd54);
                output.LXJS = DelSpace(MessageData.Fd56);
                output.MM = DelSpace(MessageData.Fd61);
                output.ZJH = DelSpace(MessageData.Fd62);
                output.QYKZJEXYSH = DelSpace(MessageData.Fd63);
                output.KMH = DelSpace(MessageData.Fd64);
                output.SJKMKZQ = DelSpace(MessageData.Fd65);
                output.NBHDDQHQBZ = DelSpace(MessageData.Fd72);
                output.BZW = (MessageData.Fd74);
                output.LL = DelSpace(MessageData.Fd84);
                output.KHXH = DelSpace(MessageData.Fd91);
                output.HQTXBZ = DelSpace(MessageData.Fd93);
                output.DEHKJE = DelSpace(MessageData.Fd100_1);
                output.KYYE = DelSpace(MessageData.Fd100_2);
                output.YZJXJE = DelSpace(MessageData.Fd100_3);
                output.DRLJJE = DelSpace(MessageData.Fd100_A);
                output.CLJZH = DelSpace(MessageData.Fd102_1);
                output.XH = DelSpace(MessageData.Fd102_2);
                output.PZZL = DelSpace(MessageData.Fd102_3);
                output.PZH = DelSpace(MessageData.Fd102_4);
                output.SFRYZQ = DelSpace(MessageData.Fd102_5);
                output.SFPM = DelSpace(MessageData.Fd102_6);
                output.SFPZJZQ = DelSpace(MessageData.Fd102_9);
                output.ZJHM = DelSpace(MessageData.Fd102_A);
                output.SFPYJZQ = DelSpace(MessageData.Fd102_B);
                output.SFZFMMQ = DelSpace(MessageData.Fd102_C);
                output.ZJLX = DelSpace(MessageData.Fd102_G);
                output.HM = DelSpace(MessageData.Fd102_H);
                output.YE = DelSpace(MessageData.Fd102_I);
                output.BZ = DelSpace(MessageData.Fd102_J);
                output.ZHLX = DelSpace(MessageData.Fd102_M);
                output.LLLX = DelSpace(MessageData.Fd102_O);
                output.YJH = DelSpace(MessageData.Fd102_T);
                output.CPMC = DelSpace(MessageData.Fd102_V);
                output.YHTZZH = DelSpace(MessageData.Fd102_W);
                output.JZZL = DelSpace(MessageData.Fd102_Z);
                output.KHH = DelSpace(MessageData.Fd105_1);
                output.CPH = DelSpace(MessageData.Fd105_2);
                output.KHRQ = DelSpace(MessageData.Fd105_3);
                output.DQRQ = DelSpace(MessageData.Fd105_4);
                output.JXRQ = DelSpace(MessageData.Fd105_5);
                output.ZHYBFSRQ = DelSpace(MessageData.Fd105_6);
                output.JZZT = DelSpace(MessageData.Fd105_7);
                output.ZHZT = DelSpace(MessageData.Fd105_8);
                output.ZHDJZT = DelSpace(MessageData.Fd105_9);
                output.ZHZFZT = DelSpace(MessageData.Fd105_A);
                output.DJJE = DelSpace(MessageData.Fd105_B);
                output.ZFJE = DelSpace(MessageData.Fd105_C);
                output.DQCKLX = DelSpace(MessageData.Fd105_D);
                output.KZJE = DelSpace(MessageData.Fd105_E);
                output.JSLX = DelSpace(MessageData.Fd105_F);
                output.ZHLX_1 = DelSpace(MessageData.Fd105_G);
                output.DXBZ = DelSpace(MessageData.Fd105_H);
                output.KTBZ = (MessageData.Fd105_K);
                output.ZXKHJE = DelSpace(MessageData.Fd105_L);
                output.ZDLCJE = DelSpace(MessageData.Fd105_M);
                output.TSDQJYJE = DelSpace(MessageData.Fd105_N);
                output.KHLX = DelSpace(MessageData.Fd107_K);
                output.JXLX = DelSpace(MessageData.Fd112_5);
                output.ZH = (MessageData.Fd30);
                output.SFEJZH = (MessageData.Fd70);
                output.WKHZE = (MessageData.Fd100_4);
                output.FSKSL = (MessageData.Fd50);
                output.ZKSL = (MessageData.Fd51);
                output.YFSCS = (MessageData.Fd55);
                output.KHMC = DelSpace(MessageData.Fd26);
                output.JZDQR = DelSpace(MessageData.Fd45);
                output.DFZH = (MessageData.Fd31);
                output.YPZH = DelSpace(MessageData.Fd58);
                output.LLFDBL = DelSpace(MessageData.Fd85);
                output.JGXYDMZH = DelSpace(MessageData.Fd107_D);
                output.KHZJLX = DelSpace(MessageData.Fd115_8);
                output.DZZHM = DelSpace(MessageData.Fd108_D);
                output.SXZH = DelSpace(MessageData.Fd32);
                output.ZCBZ = DelSpace(MessageData.Fd103_G);
                output.JZKZZT = DelSpace(MessageData.Fd59);
                output.ZJYXQ = DelSpace(MessageData.Fd47);
                output.ESLBZ = DelSpace(MessageData.Fd73);
                output.SFQX = DelSpace(MessageData.Fd93);
                output.QKXE_ZM = DelSpace(MessageData.Fd101_3);
                output.QKXE_ZZ = DelSpace(MessageData.Fd102_F);
                output.XB = DelSpace(MessageData.Fd98);
                output.GJ = DelSpace(MessageData.Fd101_G);
                output.PHONE = DelSpace(MessageData.Fd86);
                output.ZYFL = DelSpace(MessageData.Fd87);
                output.TELEPHONE = DelSpace(MessageData.Fd38);
                output.ADDRESS = DelSpace(MessageData.Fd118_7);
                output.COMADDRESS = DelSpace(MessageData.Fd119_7);
                output.MARK = DelSpace(MessageData.Fd82);
                output.XDZH = DelSpace(MessageData.Fd33);
                if(flag=="V5")
                {
                    output.DJJLS = DelSpace(MessageData.Fd36);
                    output.ZFJLS = DelSpace(MessageData.Fd48);
                }
                //因地址长度不够，需要换域;注意，后续版本采用服务配置Temp_CustomerAddressLength进行判断
                if (flag == "V11" || flag == "V9" || flag == "V8" || flag == "V5" || flag == "V0" || flag == "V1" || flag == "V6" || flag == "V7" || (flag == "V2" && LoginUserInfo.KinbrNo.Substring(0, 3) == "152") || flag == "V2" || flag == "V12" || flag == "V3" || flag == "V19" || flag == "V21" || flag == "V22" || flag == "V23" || flag == "V24" || flag == "V10" || flag == "V13" || flag == "V14" || flag == "V16" || flag == "V17" || flag == "V18" || ServiceSettings.GetConfig("Temp_CustomerAddressLength", false))
                {
                    output.ADDRESS = DelSpace(MessageData.Fd109_3);//K025接口改造
                    output.COMADDRESS = DelSpace(MessageData.Fd112_9);
                }
                output.ZJQSRQ = DelSpace(MessageData.Fd105_J);
                output.RXZH = DelSpace(MessageData.Fd106_1);
                output.LCCPMC = DelSpace(MessageData.Fd96_1);
                output.LCCPCQLX = DelSpace(MessageData.Fd103_C);
                output.LCCPSF = DelSpace(MessageData.Fd66);
                output.ZDQKJE = DelSpace(MessageData.Fd124_4);
                output.ZDXCJE = DelSpace(MessageData.Fd124_6);
                output.DWBSJE = DelSpace(MessageData.Fd124_8);
                //账号是否已转入暂停非柜面业务-莱山         2029交易全行封掉，莱山去掉此提示--20221027
                //if (flag == "V10" && output.BZW.Substring(65, 1).Equals("Y"))
                //{
                //    MessageData.Fd12 = "WARN";
                //    MessageData.Fd13 = "\n银行卡为6个月不动户异常，请做2029解除交易！";
                //}
                //是否当前柜员给自己办理业务
                if (TellerSystem.Library.Ext.TradeExtension.SystemSettingsHelper.Instance.IsTellerCustomer)
                {
                    var idCarNO = TellerSystem.Library.Ext.TradeExtension.LoginAuthentication.Instance.IdCarNO;
                    if (!string.IsNullOrEmpty(idCarNO) && output.ZJHM.Trim() == idCarNO.Trim())
                    {
                        output.IsFailed = true;
                        output.FailureCause = "当前柜员不能为自己办理业务！";
                    }
                }
                //证件是否到期
                if (!string.IsNullOrEmpty(output.ZJYXQ) && !output.IsFailed)
                {
                    if (output.ZJYXQ == "99999999" || output.ZJYXQ == "00000000")
                    {
                        output.ZJYXQ = "99991231";
                    }
                    if (Convert.ToInt32(MessageData.Fd5.ToString()) > Convert.ToInt32(output.ZJYXQ.ToString()))
                    {
                        if (flag != "V9")
                        {
                            if (flag == "V11" || flag == "V8" || flag == "V13")//证件到期提示并跳转
                            {
                                if (this.TradeAPIs.ShowQuestionMessageBox("该客户：该账号证件已到期,请立即维护！失效日期" + output.ZJYXQ + "，是否跳转到维护交易？") == System.Windows.MessageBoxResult.Yes)
                                {
                                    var tPage = this.TradeAPIs.Page;
                                    if (ServiceSettings.GetConfig("restful.ecif", false))
                                    {
                                        tPage.OpenPage("Trade.CustomerManager.T1026", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1026"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                                    }
                                    else
                                    {
                                        tPage.OpenPage("Trade.CustomerManager.T1002", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1002"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                                        output.IsFailed = true;
                                        output.FailureCause = "\n该账号证件已到期,请立即维护！失效日期" + output.ZJYXQ;
                                    }                                
                                    
                                }
                                else
                                {
                                    var tPage = this.TradeAPIs.Page;
                                    if ((flag == "V8" || flag == "V13") && !(tPage.TradeModel.Name.Contains("查询") || TradeManagerHandle.TT_SYSCONFIG_GetConfigValueByConfigID("SkipList").Contains(tPage.TradeModel.Code)))
                                    {
                                        if (flag == "V8" && SFXZ == "Y")
                                        {
                                            //MessageData.Fd12 = "WARN";
                                            //MessageData.Fd13 = "\n该账号证件已到期,请立即维护！失效日期" + output.ZJYXQ;
                                        }
                                        else
                                        {
                                            output.IsFailed = true;
                                            output.FailureCause = "\n该账号证件已到期,请立即维护！失效日期" + output.ZJYXQ;
                                            if (flag == "V13")
                                            {
                                                this.TradeAPIs.ShowTip("\n该账号证件已到期,请立即维护！失效日期" + output.ZJYXQ);
                                                this.TradeAPIs.SetFocus();
                                            }
                                        }
                                        //output.IsFailed = true;
                                        //output.FailureCause = "\n该账号证件已到期,请立即维护！失效日期" + output.ZJYXQ;
                                        //if (flag == "V13")
                                        //{
                                        //    this.TradeAPIs.ShowTip("\n该账号证件已到期,请立即维护！失效日期" + output.ZJYXQ);
                                        //    this.TradeAPIs.SetFocus();
                                        //}
                                    }
                                }
                            }
                            else
                            {
                                MessageData.Fd12 = "WARN";
                                MessageData.Fd13 = "\n该账号证件已到期,请立即维护！失效日期" + output.ZJYXQ;
                            }
                        }
                        else
                        {
                            output.IsFailed = true;
                            output.FailureCause = "\n该账号证件已到期,请立即维护！失效日期" + output.ZJYXQ;
                        }
                    }
                    else
                    {
                        var provider = System.Globalization.CultureInfo.CurrentUICulture;
                        TimeSpan timeSpan = DateTime.ParseExact(output.ZJYXQ, "yyyyMMdd",provider) - DateTime.ParseExact(MessageData.Fd5.Trim(), "yyyyMMdd",provider);
                        if (timeSpan.Days < 30 && timeSpan.Days >= 0)
                        {
                            if (flag == "V11")//证件到期提示并跳转
                            {
                                if (this.TradeAPIs.ShowQuestionMessageBox("该客户：证件有效期即将到期,请立即维护！失效日期" + output.ZJYXQ + "，是否跳转到维护交易？") == System.Windows.MessageBoxResult.Yes)
                                {
                                    var tPage = this.TradeAPIs.Page;
                                    if (ServiceSettings.GetConfig("restful.ecif", false))
                                    {
                                        tPage.OpenPage("Trade.CustomerManager.T1026", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1026"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                                    }
                                    else
                                    {
                                        tPage.OpenPage("Trade.CustomerManager.T1002", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1002"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                                    }
                                    
                                }
                            }
                            else
                            {
                                MessageData.Fd12 = "WARN";
                                MessageData.Fd13 = "\n证件有效期即将到期,请立即维护！失效日期" + output.ZJYXQ + "\n";
                            }
                        }
                    }
                }
                if (ZH.Trim() != output.CLJZH.Trim() && output.JZZL == "1010" && !output.IsFailed && flag != "V11")
                {
                    MessageData.Fd12 = "WARN";
                    MessageData.Fd13 = "\n输入的是老账号，且为一本通存折，请先做换折\n";
                }
                if (flag == "V5" && LoginUserInfo.KinbrNo.Substring(0, 3) == "301" && !output.IsFailed && output.KHLX == "1")//邹平青隆客户信息不全校验
                {
                    if (MessageData.Fd82.Substring(0, 1) == "N")//客户信息中存在空白或不正确项
                    {
                        string kong = string.Empty;//数据为空
                        string format = string.Empty;//数据格式错误
                        string Inconsistent = string.Empty;//核心与ecif数据不一致
                        if (MessageData.Fd102_G == "1")//身份证时存在发证机关、地区名称、地区编码
                        {
                            for (var k = 1; k < 19; k++)
                            {
                                #region
                                if (MessageData.Fd82.Substring(k, 1) == "1")//数据为空
                                {
                                    switch (k)
                                    {
                                        case 1:
                                            kong += "身份证有效期-起始日期、";
                                            break;
                                        case 2:
                                            kong += "身份证有效期-到期日期、";
                                            break;
                                        case 3:
                                            kong += "出生日期、";
                                            break;
                                        case 4:
                                            kong += "职业分类、";
                                            break;
                                        case 5:
                                            kong += "职业、";
                                            break;
                                        case 6:
                                            kong += "性别、";
                                            break;
                                        case 7:
                                            kong += "国籍、";
                                            break;
                                        case 8:
                                            kong += "手机号码、";
                                            break;
                                        case 9:
                                            kong += "联系地址、";
                                            break;
                                        case 10:
                                            kong += "邮编、";
                                            break;
                                        case 11:
                                            kong += "单位地址、";
                                            break;
                                        case 12:
                                            kong += "民族、";
                                            break;
                                        case 13:
                                            kong += "学历、";
                                            break;
                                        case 14:
                                            kong += "婚否、";
                                            break;
                                        case 15:
                                            kong += "月收入、";
                                            break;
                                        case 16:
                                            kong += "发证机关、";
                                            break;
                                        case 17:
                                            kong += "地区编码、";
                                            break;
                                        case 18:
                                            kong += "地区名称";
                                            break;
                                        default:
                                            break;
                                    }
                                }
                                #endregion
                                #region
                                if (MessageData.Fd82.Substring(k, 1) == "2")//数据格式有误
                                {
                                    switch (k)
                                    {
                                        case 1:
                                            format += "身份证有效期-起始日期、";
                                            break;
                                        case 2:
                                            format += "身份证有效期-到期日期、";
                                            break;
                                        case 3:
                                            format += "出生日期、";
                                            break;
                                        case 4:
                                            format += "职业分类、";
                                            break;
                                        case 5:
                                            format += "职业、";
                                            break;
                                        case 6:
                                            format += "性别、";
                                            break;
                                        case 7:
                                            format += "国籍、";
                                            break;
                                        case 8:
                                            format += "手机号码、";
                                            break;
                                        case 9:
                                            format += "联系地址、";
                                            break;
                                        case 10:
                                            format += "邮编、";
                                            break;
                                        case 11:
                                            format += "单位地址、";
                                            break;
                                        case 12:
                                            format += "民族、";
                                            break;
                                        case 13:
                                            format += "学历、";
                                            break;
                                        case 14:
                                            format += "婚否、";
                                            break;
                                        case 15:
                                            format += "月收入、";
                                            break;
                                        case 16:
                                            format += "发证机关、";
                                            break;
                                        case 17:
                                            format += "地区编码、";
                                            break;
                                        case 18:
                                            format += "地区名称";
                                            break;
                                        default:
                                            break;
                                    }
                                }
                                #endregion
                                #region
                                if (MessageData.Fd82.Substring(k, 1) == "3")//核心与ecif数据不一致
                                {
                                    switch (k)
                                    {
                                        case 1:
                                            Inconsistent += "身份证有效期-起始日期、";
                                            break;
                                        case 2:
                                            Inconsistent += "身份证有效期-到期日期、";
                                            break;
                                        case 3:
                                            Inconsistent += "出生日期、";
                                            break;
                                        case 4:
                                            Inconsistent += "职业分类、";
                                            break;
                                        case 5:
                                            Inconsistent += "职业、";
                                            break;
                                        case 6:
                                            Inconsistent += "性别、";
                                            break;
                                        case 7:
                                            Inconsistent += "国籍、";
                                            break;
                                        case 8:
                                            Inconsistent += "手机号码、";
                                            break;
                                        case 9:
                                            Inconsistent += "联系地址、";
                                            break;
                                        case 10:
                                            Inconsistent += "邮编、";
                                            break;
                                        case 11:
                                            Inconsistent += "单位地址、";
                                            break;
                                        case 12:
                                            Inconsistent += "民族、";
                                            break;
                                        case 13:
                                            Inconsistent += "学历、";
                                            break;
                                        case 14:
                                            Inconsistent += "婚否、";
                                            break;
                                        case 15:
                                            Inconsistent += "月收入、";
                                            break;
                                        case 16:
                                            Inconsistent += "发证机关、";
                                            break;
                                        case 17:
                                            Inconsistent += "地区编码、";
                                            break;
                                        case 18:
                                            Inconsistent += "地区名称";
                                            break;
                                        default:
                                            break;
                                    }
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            for (var k = 1; k < 16; k++)
                            {
                                #region
                                if (MessageData.Fd82.Substring(k, 1) == "1")//数据为空
                                {
                                    switch (k)
                                    {
                                        case 1:
                                            kong += "身份证有效期-起始日期、";
                                            break;
                                        case 2:
                                            kong += "身份证有效期-到期日期、";
                                            break;
                                        case 3:
                                            kong += "出生日期、";
                                            break;
                                        case 4:
                                            kong += "职业分类、";
                                            break;
                                        case 5:
                                            kong += "职业、";
                                            break;
                                        case 6:
                                            kong += "性别、";
                                            break;
                                        case 7:
                                            kong += "国籍、";
                                            break;
                                        case 8:
                                            kong += "手机号码、";
                                            break;
                                        case 9:
                                            kong += "联系地址、";
                                            break;
                                        case 10:
                                            kong += "邮编、";
                                            break;
                                        case 11:
                                            kong += "单位地址、";
                                            break;
                                        case 12:
                                            kong += "民族、";
                                            break;
                                        case 13:
                                            kong += "学历、";
                                            break;
                                        case 14:
                                            kong += "婚否、";
                                            break;
                                        case 15:
                                            kong += "月收入、";
                                            break;
                                        default:
                                            break;
                                    }
                                }
                                #endregion
                                #region
                                if (MessageData.Fd82.Substring(k, 1) == "2")//数据格式有误
                                {
                                    switch (k)
                                    {
                                        case 1:
                                            format += "身份证有效期-起始日期、";
                                            break;
                                        case 2:
                                            format += "身份证有效期-到期日期、";
                                            break;
                                        case 3:
                                            format += "出生日期、";
                                            break;
                                        case 4:
                                            format += "职业分类、";
                                            break;
                                        case 5:
                                            format += "职业、";
                                            break;
                                        case 6:
                                            format += "性别、";
                                            break;
                                        case 7:
                                            format += "国籍、";
                                            break;
                                        case 8:
                                            format += "手机号码、";
                                            break;
                                        case 9:
                                            format += "联系地址、";
                                            break;
                                        case 10:
                                            format += "邮编、";
                                            break;
                                        case 11:
                                            format += "单位地址、";
                                            break;
                                        case 12:
                                            format += "民族、";
                                            break;
                                        case 13:
                                            format += "学历、";
                                            break;
                                        case 14:
                                            format += "婚否、";
                                            break;
                                        case 15:
                                            format += "月收入、";
                                            break;
                                        default:
                                            break;
                                    }
                                }
                                #endregion
                                #region
                                if (MessageData.Fd82.Substring(k, 1) == "3")//核心与ecif数据不一致
                                {
                                    switch (k)
                                    {
                                        case 1:
                                            Inconsistent += "身份证有效期-起始日期、";
                                            break;
                                        case 2:
                                            Inconsistent += "身份证有效期-到期日期、";
                                            break;
                                        case 3:
                                            Inconsistent += "出生日期、";
                                            break;
                                        case 4:
                                            Inconsistent += "职业分类、";
                                            break;
                                        case 5:
                                            Inconsistent += "职业、";
                                            break;
                                        case 6:
                                            Inconsistent += "性别、";
                                            break;
                                        case 7:
                                            Inconsistent += "国籍、";
                                            break;
                                        case 8:
                                            Inconsistent += "手机号码、";
                                            break;
                                        case 9:
                                            Inconsistent += "联系地址、";
                                            break;
                                        case 10:
                                            Inconsistent += "邮编、";
                                            break;
                                        case 11:
                                            Inconsistent += "单位地址、";
                                            break;
                                        case 12:
                                            Inconsistent += "民族、";
                                            break;
                                        case 13:
                                            Inconsistent += "学历、";
                                            break;
                                        case 14:
                                            Inconsistent += "婚否、";
                                            break;
                                        case 15:
                                            Inconsistent += "月收入、";
                                            break;
                                        default:
                                            break;
                                    }
                                }
                                #endregion
                            }
                        }
                        
                        if (!string.IsNullOrEmpty(kong) || !string.IsNullOrEmpty(format) || !string.IsNullOrEmpty(Inconsistent))
                        {
                            if (!string.IsNullOrEmpty(kong))
                            {
                                if (kong.EndsWith("、"))
                                {
                                    kong = kong.Substring(0, kong.Length - 1);
                                }
                                kong += "数据为空!";
                            }
                            if (!string.IsNullOrEmpty(format))
                            {
                                if (format.EndsWith("、"))
                                {
                                    format = format.Substring(0, format.Length - 1);
                                }
                                format += "数据格式错误!";
                            }
                            if (!string.IsNullOrEmpty(Inconsistent))
                            {
                                if (Inconsistent.EndsWith("、"))
                                {
                                    Inconsistent = Inconsistent.Substring(0, Inconsistent.Length - 1);
                                }
                                Inconsistent += "数据不一致!";
                            }
                            if (this.TradeAPIs.ShowQuestionMessageBox("该客户：" + kong + '\n' + Inconsistent + '\n' + format + '\n' + "是否跳转到1002维护交易？") == System.Windows.MessageBoxResult.Yes)
                            {
                                var tPage = this.TradeAPIs.Page;
                                if (ServiceSettings.GetConfig("restful.ecif", false))
                                {
                                    tPage.OpenPage("Trade.CustomerManager.T1026", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1026"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                                }
                                else
                                {
                                    tPage.OpenPage("Trade.CustomerManager.T1002", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1002"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                                }
                                
                            }
                        }
                    }
                }
                if (flag == "V17" && !output.IsFailed && output.KHLX == "1")//蒙阴客户信息不全校验
                {
                    if (MessageData.Fd105_J.Trim() == "19000101")//证件起始日期
                    {
                        if (ServiceSettings.GetConfig("restful.ecif", false))
                        {
                            if (this.TradeAPIs.ShowQuestionMessageBox("该客户证件起始日期为19000101是否跳转到1026维护交易？") == System.Windows.MessageBoxResult.Yes)
                            {
                                var tPage = this.TradeAPIs.Page;
                                tPage.OpenPage("Trade.CustomerManager.T1026", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1026"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                            }
                        }
                        else
                        {
                            if (this.TradeAPIs.ShowQuestionMessageBox("该客户证件起始日期为19000101是否跳转到1002维护交易？") == System.Windows.MessageBoxResult.Yes)
                            {
                                var tPage = this.TradeAPIs.Page;
                                tPage.OpenPage("Trade.CustomerManager.T1002", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1002"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                            }
                        }                       
                    }
                    if (MessageData.Fd82.Substring(0, 1) == "N")//客户信息中存在空白或不正确项
                    {
                        string kong = string.Empty;//数据为空
                        string zyfl = string.Empty;//职业分类
                        if (DelSpace(MessageData.Fd87) == "Y")//职业分类为不便分类的其他从业人员
                        {
                            zyfl = "职业分类为：不便分类的其他从业人员！";
                        }
                        if (MessageData.Fd102_G == "1")//身份证时存在发证机关、地区名称、地区编码
                        {
                            for (var k = 1; k < 19; k++)
                            {
                                #region
                                if (MessageData.Fd82.Substring(k, 1) == "1")//数据为空
                                {
                                    switch (k)
                                    {
                                        case 1:
                                            kong += "身份证有效期-起始日期、";
                                            break;
                                        case 2:
                                            kong += "身份证有效期-到期日期、";
                                            break;
                                        case 3:
                                            kong += "出生日期、";
                                            break;
                                        case 4:
                                            kong += "职业分类、";
                                            break;
                                        case 5:
                                            kong += "职业、";
                                            break;
                                        case 6:
                                            kong += "性别、";
                                            break;
                                        case 7:
                                            kong += "国籍、";
                                            break;
                                        case 8:
                                            kong += "手机号码、";
                                            break;
                                        case 9:
                                            kong += "联系地址、";
                                            break;
                                        case 10:
                                            break;
                                        case 11:
                                            break;
                                        case 12:
                                            break;
                                        case 13:
                                            break;
                                        case 14:
                                            break;
                                        case 15:
                                            break;
                                        case 16:
                                            kong += "发证机关、";
                                            break;
                                        case 17:
                                            kong += "地区编码、";
                                            break;
                                        case 18:
                                            break;
                                        default:
                                            break;
                                    }
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            for (var k = 1; k < 16; k++)
                            {
                                #region
                                if (MessageData.Fd82.Substring(k, 1) == "1")//数据为空
                                {
                                    switch (k)
                                    {
                                        case 1:
                                            kong += "身份证有效期-起始日期、";
                                            break;
                                        case 2:
                                            kong += "身份证有效期-到期日期、";
                                            break;
                                        case 3:
                                            kong += "出生日期、";
                                            break;
                                        case 4:
                                            kong += "职业分类、";
                                            break;
                                        case 5:
                                            kong += "职业、";
                                            break;
                                        case 6:
                                            kong += "性别、";
                                            break;
                                        case 7:
                                            kong += "国籍、";
                                            break;
                                        case 8:
                                            kong += "手机号码、";
                                            break;
                                        case 9:
                                            kong += "联系地址、";
                                            break;
                                        case 10:
                                            break;
                                        case 11:
                                            break;
                                        case 12:
                                            break;
                                        case 13:
                                            break;
                                        case 14:
                                            break;
                                        case 15:
                                            break;
                                        default:
                                            break;
                                    }
                                }
                                #endregion
                            }
                        }

                        if (!string.IsNullOrEmpty(kong))
                        {
                            if (!string.IsNullOrEmpty(kong))
                            {
                                if (kong.EndsWith("、"))
                                {
                                    kong = kong.Substring(0, kong.Length - 1);
                                }
                                kong += "数据为空!";
                            }
                            if (ServiceSettings.GetConfig("restful.ecif", false))
                            {
                                if (this.TradeAPIs.ShowQuestionMessageBox("该客户：" + kong + '\n' + zyfl + '\n' + "是否跳转到1026维护交易？") == System.Windows.MessageBoxResult.Yes)
                                {
                                    var tPage = this.TradeAPIs.Page;
                                    tPage.OpenPage("Trade.CustomerManager.T1026", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1026"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                                }
                            }
                            else
                            {
                                if (this.TradeAPIs.ShowQuestionMessageBox("该客户：" + kong + '\n' + zyfl + '\n' + "是否跳转到1002维护交易？") == System.Windows.MessageBoxResult.Yes)
                                {
                                    var tPage = this.TradeAPIs.Page;
                                    tPage.OpenPage("Trade.CustomerManager.T1002", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1002"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                                }
                            }
                            
                        }
                    }
                }
                #region //郏县九要素校验
                #region //Fd82域
                /**0820域，返回客户信息查询验证结果，bit[0]为整体验证结果，bit[1]--bit[18]为各个要素验证结果，
                * 其中[0:检查通过 1:数据为空 2:数据格式有误 3:核心与Ecif数据不一致]
                bit[0]：客户信息验证结果[Y:客户信息完整准确 N:客户信息中存在空白或不正确项]
                bit[1]：身份证有效期-起始日期 [*：客户证件不是身份证]
                bit[2]：身份证有效期-到期日期
                bit[3]：出生日期
                bit[4]: 职业分类
                bit[5]: 职业
                bit[6]: 性别
                bit[7]: 国籍
                bit[8]: 手机号码
                bit[9]: 联系地址
                bit[10]: 邮编
                bit[11]: 单位地址
                bit[12]: 民族
                bit[13]: 学历
                bit[14]: 婚否
                bit[15]: 月收入
                bit[16]: 发证机关
                bit[17]: 地区编码
                bit[18]：地区名称
                bit[19]：姓名
                bit[20]：证件类型
                bit[21]：证件号码
                bit[22]：核心新郑版本 地址：0-正常地址长度   1-客户信息地址长度不足10个汉字
                bit[23]：
                **/
                #endregion
                if (((flag=="V0"&&SFTS=="1")||flag == "V1" || (flag == "V2") || flag == "V8")&& !output.IsFailed && output.KHLX == "1")//郏县客户信息不全校验
                {
                    if (MessageData.Fd82.Substring(0, 1) == "N")//客户信息中存在空白或不正确项
                    {
                        string kong = string.Empty;//数据为空
                        string zyfl = string.Empty;//职业分类
                        for (var k = 1; k < 22; k++)
                        {
                            #region
                            if (MessageData.Fd82.Substring(k, 1) == "1")//数据为空
                            {
                                switch (k)
                                {
                                    case 1:
                                        kong += "身份证有效期-起始日期、";
                                        break;
                                    case 2:
                                        kong += "身份证有效期-到期日期、";
                                        break;
                                    case 3:
                                        break;
                                    case 4:
                                        break;
                                    case 5:
                                        kong += "职业、";
                                        break;
                                    case 6:
                                        kong += "性别、";
                                        break;
                                    case 7:
                                        kong += "国籍、";
                                        break;
                                    case 8:
                                        kong += "手机号码、";
                                        break;
                                    case 9:
                                        kong += "联系地址、";
                                        break;
                                    case 10:
                                        break;
                                    case 11:
                                        break;
                                    case 12:
                                        break;
                                    case 13:
                                        break;
                                    case 14:
                                        break;
                                    case 15:
                                        break;
                                    case 16:
                                        break;
                                    case 17:
                                        break;
                                    case 18:
                                        break;
                                    case 19:
                                        kong += "姓名、";
                                        break;
                                    case 20:
                                        kong += "证件类型、";
                                        break;
                                    case 21:
                                        kong += "证件号码、";
                                        break;
                                    default:
                                        break;
                                }
                            }
                            #endregion
                        }
                        if (flag == "V2" && LoginUserInfo.KinbrNo.Substring(0, 3) == "152" && MessageData.Fd82.Trim().Length > 22)
                        {
                            if (MessageData.Fd82.Substring(22, 1) == "1")
                            {
                                kong += "联系地址、";
                            }
                        }
                        if (!string.IsNullOrEmpty(kong))
                        {
                            if (!string.IsNullOrEmpty(kong))
                            {
                                if (kong.EndsWith("、"))
                                {
                                    kong = kong.Substring(0, kong.Length - 1);
                                }
                                kong += "数据为空!";
                            }
                            if (ServiceSettings.GetConfig("restful.ecif", false))
                            {
                                if (this.TradeAPIs.ShowQuestionMessageBox("该客户：" + kong + '\n' + zyfl + '\n' + "是否跳转到1026维护交易？") == System.Windows.MessageBoxResult.Yes)
                                {
                                    var tPage = this.TradeAPIs.Page;
                                    tPage.OpenPage("Trade.CustomerManager.T1026", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1026"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                                }
                            }
                            else
                            {
                                if (this.TradeAPIs.ShowQuestionMessageBox("该客户：" + kong + '\n' + zyfl + '\n' + "是否跳转到1002维护交易？") == System.Windows.MessageBoxResult.Yes)
                                {
                                    var tPage = this.TradeAPIs.Page;
                                    tPage.OpenPage("Trade.CustomerManager.T1002", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1002"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                                }else
                                {
                                    var tPage = this.TradeAPIs.Page;
                                    if (flag == "V8" && !(tPage.TradeModel.Name.Contains("查询") || TradeManagerHandle.TT_SYSCONFIG_GetConfigValueByConfigID("SkipList").Contains(tPage.TradeModel.Code)))
                                    {
                                         output.IsFailed = true;
                                         output.FailureCause = "\n该客户：" + kong;
                                    }
                                }
                            }                          
                        }
                        //else
                        //{
                        //    if (flag == "V2" && LoginUserInfo.KinbrNo.Substring(0, 3) == "152")
                        //    {
                        //        if (this.TradeAPIs.ShowQuestionMessageBox("请核实客户信息是否准确？") == System.Windows.MessageBoxResult.Yes)
                        //        {
                        //            var tPage = this.TradeAPIs.Page;
                        //            tPage.OpenPage("Trade.CustomerManager.T1002", new Dictionary<string, object>()
                        //                                    {
                        //                                        {"_open_path", "T1002"},
                        //                                        {"_ID_NO", output.ZJHM},
                        //                                    });
                        //        }
                        //    }
                        //}
                    }
                }
                #endregion

                //辰州客户信息不全校验
                #region
                if (flag == "V9" && !output.IsFailed && output.KHLX == "1")//蒙阴客户信息不全校验
                {
                    if (MessageData.Fd82.Substring(0, 1) == "N")//客户信息中存在空白或不正确项
                    {
                        string kong = string.Empty;//数据为空
                        string zyfl = string.Empty;//职业分类

                        int jzdz = 0;
                        int lxfs = 0;
                        int zy = 0;
                        if (MessageData.Fd102_G == "1")//身份证时存在证件有效期
                        {
                            for (var k = 1; k < 19; k++)
                            {
                                #region
                                if (MessageData.Fd82.Substring(k, 1) == "1")//数据为空
                                {
                                    switch (k)
                                    {
                                        case 1:
                                            kong += "身份证有效期-起始日期、";
                                            break;
                                        case 2:
                                            kong += "身份证有效期-到期日期、";
                                            break;
                                        case 3:
                                            break;
                                        case 4:
                                            zy++;
                                            break;
                                        case 5:
                                            zy++;
                                            break;
                                        case 6:
                                            kong += "性别、";
                                            break;
                                        case 7:
                                            kong += "国籍、";
                                            break;
                                        case 8:
                                            lxfs++;
                                            break;
                                        case 9:
                                            jzdz++;
                                            break;
                                        case 10:
                                            break;
                                        case 11:
                                            jzdz++;
                                            break;
                                        case 12:
                                            break;
                                        case 13:
                                            break;
                                        case 14:
                                            break;
                                        case 15:
                                            break;
                                        case 16:
                                            break;
                                        case 17:
                                            break;
                                        case 18:
                                            break;
                                        case 19:
                                            jzdz++;
                                            break;
                                        case 20:
                                            kong += "证件类型、";
                                            break;
                                        case 21:
                                            kong += "证件号码、";
                                            break;
                                        case 22:
                                            lxfs++;
                                            break;
                                        default:
                                            break;
                                    }
                                }
                                #endregion
                            }
                        }
                        else
                        {
                            for (var k = 1; k < 16; k++)
                            {
                                #region
                                if (MessageData.Fd82.Substring(k, 1) == "1")//数据为空
                                {
                                    switch (k)
                                    {
                                        case 1:
                                            break;
                                        case 2:
                                            break;
                                        case 3:
                                            break;
                                        case 4:
                                            zy++;
                                            break;
                                        case 5:
                                            zy++;
                                            break;
                                        case 6:
                                            kong += "性别、";
                                            break;
                                        case 7:
                                            kong += "国籍、";
                                            break;
                                        case 8:
                                            lxfs++;
                                            break;
                                        case 9:
                                            jzdz++;
                                            break;
                                        case 10:
                                            break;
                                        case 11:
                                            jzdz++;
                                            break;
                                        case 12:
                                            break;
                                        case 13:
                                            break;
                                        case 14:
                                            break;
                                        case 15:
                                            break;
                                        case 16:
                                            break;
                                        case 17:
                                            break;
                                        case 18:
                                            break;
                                        case 19:
                                            jzdz++;
                                            break;
                                        case 20:
                                            kong += "证件类型、";
                                            break;
                                        case 21:
                                            kong += "证件号码、";
                                            break;
                                        case 22:
                                            lxfs++;
                                            break;
                                        default:
                                            break;
                                    }
                                }
                                #endregion
                            }
                        }
                        if (zy > 1)
                            kong += "职业、";
                        if (jzdz > 2)
                            kong += "居住地址、";
                        if (lxfs > 1)
                            kong += "联系方式";
                        if (!string.IsNullOrEmpty(kong))
                        {
                            if (!string.IsNullOrEmpty(kong))
                            {
                                if (kong.EndsWith("、"))
                                {
                                    kong = kong.Substring(0, kong.Length - 1);
                                }
                                kong += "数据为空!";
                            }
                            if (ServiceSettings.GetConfig("restful.ecif", false))
                            {
                                if (this.TradeAPIs.ShowQuestionMessageBox("该客户：" + kong + '\n' + zyfl + '\n' + "是否跳转到1026维护交易？") == System.Windows.MessageBoxResult.Yes)
                                {
                                    var tPage = this.TradeAPIs.Page;
                                    tPage.OpenPage("Trade.CustomerManager.T1026", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1026"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                                }
                            }
                            else
                            {
                                if (this.TradeAPIs.ShowQuestionMessageBox("该客户：" + kong + '\n' + zyfl + '\n' + "是否跳转到1002维护交易？") == System.Windows.MessageBoxResult.Yes)
                                {
                                    var tPage = this.TradeAPIs.Page;
                                    tPage.OpenPage("Trade.CustomerManager.T1002", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1002"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                                }
                            }
                            
                        }
                    }
                }
                #endregion

                if ((flag == "V5" && LoginUserInfo.KinbrNo.Substring(0, 3) == "302") && !output.IsFailed && output.KHLX == "1")//阳光客户信息不全校验
                {
                    string XB = "性别、";
                    string GJ = " 国籍、";
                    string SJH = "手机号、";
                    string GDDH = "固定电话、";
                    //string JZDZ = "居住地址、";
                    string LXDZ = "联系地址、";
                    string QSRQ = "证件起始日期、";
                    string ZZRQ = "证件终止日期";
                    if (!string.IsNullOrEmpty(output.XB))
                    {
                        XB = string.Empty;
                    }
                    if (!string.IsNullOrEmpty(output.GJ))
                    {
                        GJ = string.Empty;
                    }
                    if (!string.IsNullOrEmpty(output.PHONE) || !string.IsNullOrEmpty(output.TELEPHONE))
                    {
                        SJH = GDDH = string.Empty;
                    }
                    if (!string.IsNullOrEmpty(output.ADDRESS))
                    {
                        LXDZ = string.Empty;
                    }
                    if ((!string.IsNullOrEmpty(output.ZJQSRQ)) && (!string.IsNullOrEmpty(output.ZJYXQ)))
                    {
                        if ((output.ZJYXQ != "00000000" && output.ZJQSRQ != "19000101"))
                        {
                            QSRQ = string.Empty;
                        }
                        if (output.ZJYXQ != "99999999")
                        {
                            ZZRQ = string.Empty;
                        }
                    }
                    if (!string.IsNullOrEmpty(XB) || !string.IsNullOrEmpty(GJ) || !string.IsNullOrEmpty(SJH) || !string.IsNullOrEmpty(GDDH) || !string.IsNullOrEmpty(LXDZ) || !string.IsNullOrEmpty(QSRQ) || !string.IsNullOrEmpty(ZZRQ))
                    {
                        if (this.TradeAPIs.ShowQuestionMessageBox("该客户：" + XB + GJ + SJH + GDDH + LXDZ + QSRQ + ZZRQ + "信息不全，是否跳转到维护交易？") == System.Windows.MessageBoxResult.Yes)
                        {
                            var tPage = this.TradeAPIs.Page;
                            if (ServiceSettings.GetConfig("restful.ecif", false))
                            {
                                tPage.OpenPage("Trade.CustomerManager.T1026", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1026"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                            }
                            else
                            {
                                tPage.OpenPage("Trade.CustomerManager.T1002", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1002"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                            }                          
                        }
                        //else
                        //{
                        //    var tPage = this.TradeAPIs.Page;
                        //    if (flag == "V8" && !(tPage.TradeModel.Name.Contains("查询") || TradeManagerHandle.TT_SYSCONFIG_GetConfigValueByConfigID("SkipList").Contains(tPage.TradeModel.Code)))
                        //    {
                        //        output.IsFailed = true;
                        //        output.FailureCause = "\n该客户：" + XB + GJ + SJH + GDDH + LXDZ + QSRQ + ZZRQ + "信息不全！";
                        //    }
                        //}
                    }
                }
                if (flag == "V5" && LoginUserInfo.KinbrNo.Substring(0, 3) == "302")
                {
                    if (output.ZJQSRQ.Trim() == "99991231" || output.ZJQSRQ.Trim() == "99999999")
                    {
                        if (this.TradeAPIs.ShowQuestionMessageBox("该客户证件开始日期信息不符合规范，是否跳转到维护交易？") == System.Windows.MessageBoxResult.Yes)
                        {
                            var tPage = this.TradeAPIs.Page;
                            if (ServiceSettings.GetConfig("restful.ecif", false))
                            {
                                tPage.OpenPage("Trade.CustomerManager.T1026", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1026"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                            }
                            else
                            {
                                tPage.OpenPage("Trade.CustomerManager.T1002", new Dictionary<string, object>()
                                                            {
                                                                {"_open_path", "T1002"},
                                                                {"_ID_NO", output.ZJHM},
                                                            });
                            }                           
                        }
                        else
                        {
                            //this.TradeAPIs.SetFocus();
                            return output; 
                        }
                    }
                }
                //大石桥 该账户已暂停非柜面业务,20200714增加泗水版本
                if ((flag == "V11" || flag == "V14") && output.BZW.Substring(65, 1).Equals("Y"))
                {
                    MessageData.Fd12 = "WARN";
                    MessageData.Fd13 = "该账户已暂停非柜面业务！";
                }
                if (flag == "V21" || flag == "V22")//天骄，七日盈可用余额
                {
                    output.QRYYE = DelSpace(MessageData.Fd101_9);
                }
                if (flag == "V13" || flag == "V10")
                {
                    output.SJJCS = DelSpace(MessageData.Fd35);
                }
                if (flag == "V21" && output.BZW.Substring(65, 1).Equals("Y"))
                {
                    if (this.TradeAPIs.ShowQuestionMessageBox("该账户存在灰名单限制，是否继续办理业务？", "账号灰名单提示", MessageBoxResult.No, MessageBoxButton.YesNo) == MessageBoxResult.No)
                        {
                            output.IsFailed = true;
                            output.FailureCause = "该账户存在灰名单限制,请确认！";

                        }
                        else 
                        {
                            return output;
                        }
                }
                return output;
            }
        }
        #endregion
    }
}
