Exemplo n.º 1
0
 private InterBankOpenAcctInfo GetModel(bool isAdd)
 {
     InterBankOpenAcctInfo info=new InterBankOpenAcctInfo();
     info.AMOUNT = double.Parse(string.IsNullOrEmpty(交易金额.Text) ? "0" : 交易金额.Text);
     info.AUTO_REDEPO = 定期自动转存标志.Text == "1" ? true : false;
     info.CURRENT_ACCOUNT = 资金来源活期账号.Text;
     info.CUSTOMER_CODE = 客户内码.Text;
     info.DEPOSIT_TYPE = (AidTypeDefine.INTER_BANK_DEPOSITING_CATEGORY)Enum.Parse(typeof(AidTypeDefine.INTER_BANK_DEPOSITING_CATEGORY), 存款种类.Text);
     info.INTEREST_ACCOUNT = 收息账号.Text;
     info.INTEREST_BEARING_MANNER = (AidTypeDefine.INTER_BANK_COUPON_TYPE)Enum.Parse(typeof(AidTypeDefine.INTER_BANK_COUPON_TYPE), 计息方式.Text);
     info.BIZ_TERM_TYPE = 业务类型.Text == "1" ? AidTypeDefine.INTER_BANK_BIZ_TERM_TYPE.Current : AidTypeDefine.INTER_BANK_BIZ_TERM_TYPE.Fixed;
     info.MATURITY_DATE =string.IsNullOrEmpty(到期日期.Text) ? DateTime.Now : DateTime.Parse(到期日期.Text);
     info.NOTICE_NO = 通知单编号.Text;
     info.OPERATION_TYPE = isAdd ? AidTypeDefine.INTER_BANK_OPERATION_TYPE.CreateNew : AidTypeDefine.INTER_BANK_OPERATION_TYPE.Cancel;
     info.RATE = double.Parse(string.IsNullOrEmpty(利率.Text) ? "0" : 利率.Text);
     info.VALUE_DATE =string.IsNullOrEmpty(起息日期.Text.Trim()) ? DateTime.Now : DateTime.Parse(起息日期.Text);
     return info;
 }
        /// <summary>
        /// 活期定期开户
        /// </summary>
        /// <param name="info"></param>
        /// <param name="isCurrent">活期or定期</param>
        /// <param name="isCancel">是否撤销</param>
        /// <param name="outmsg"></param>
        /// <returns></returns>
        public static RegularResult InterBankOpenAccount(string orgID, string tellerNO, DateTime tradeDate, InterBankOpenAcctInfo info)
        {
            string outmsg = "";
            bool isOk = ClientSyncHelper.OnOpenAccount(orgID, tellerNO, tradeDate, info, out outmsg);
            if (!isOk)
            {
                outmsg = string.Format("{0}{1}", MsgHandlerEntry.Info_Return_Core, outmsg);
            }

            return new RegularResult(isOk, outmsg);
        }
Exemplo n.º 3
0
        /// <summary>
        /// 活期定期开户
        /// </summary>
        /// <param name="info"></param>
        /// <param name="outmsg"></param>
        /// <returns></returns>
        internal static bool OnOpenAccount(string orgID, string tellerNO, DateTime tradeDate, InterBankOpenAcctInfo info, out string outmsg)
        {
            outmsg = "";
            byte[] codemsg = null;
            bool sent = false;
            string dbexception = "";
            MessageData reqdata = null;
            MessageData recdata = null;
            Guid msgid = Guid.Empty;
            try
            {
                msgid = MsgTransferUtility.OpenAccount(orgID, tellerNO, tradeDate, info, ref codemsg);
                reqdata = MsgHandlerEntry.CreateMessageData(msgid, PlatformType.Core, tellerNO, orgID, (int)MessageBizType.CoreInterBankOpenAccount, codemsg, info.NOTICE_NO);
#if MQSYNC
                recdata = MQMsgHandlerEntry.DeliverMessage(reqdata, codemsg, out sent);
#else
                recdata = MsgHandlerEntry.DeliverMessage(MsgHandlerEntry.CreateMessageData(msgid, PlatformType.Core, codemsg));
#endif

                InterBankOpenAcctData data = MsgTransfer.DecodeMsg(recdata.MessageID, recdata.CurrentRespPackage.PackageMessage) as InterBankOpenAcctData;
                if (data != null)
                {
                    if (!String.IsNullOrEmpty(data.SyserrHandler.Message))
                    {
                        outmsg = data.SyserrHandler.Message;
                    }
                    else
                    {
                        outmsg = MsgHandlerEntry.ExtractOMsg(data);
                    }

                    if (string.IsNullOrEmpty(outmsg) || outmsg.Trim() == "")
                        return true;
                }
                else
                {
                    outmsg = MsgHandlerEntry.Type_Convert_Error;
                }

                OnUpdateDBLog(recdata.MessageID, outmsg, MsgLogState.RecvFailed, out dbexception);
                return false;
            }
            catch (Exception ex)
            {
                outmsg = ex.Message;
                OnException(sent, reqdata, recdata, msgid, ex, outmsg);
                return false;
            }

        }
Exemplo n.º 4
0
        /// <summary>
        /// 活期定期开户
        /// </summary>
        /// <param name="info"></param>
        /// <param name="codemsg"></param>
        /// <returns></returns>
        public static Guid OpenAccount(string orgID, string tellerNO, DateTime tradeDate, InterBankOpenAcctInfo info, ref byte[] codemsg)
        {
            InterBankOpenAcctData data = new InterBankOpenAcctData();

            data.RQhdrHandler.SYS_TXID = "415660"; // 新增,主机启动原交易码
            data.RQhdrHandler.TX_OUNO = orgID;
            data.RQhdrHandler.TEL_ID = tellerNO;
            data.RQhdrHandler.TX_MODE = "0";
            data.RQhdrHandler.TX_DTE = tradeDate.ToString("yyyy-MM-dd");
            data.RQhdrHandler.SRV_JNO = CommonDataHelper.SpaceString(12);
            data.RQhdrHandler.SRV_REV_JNO = CommonDataHelper.SpaceString(12);
            data.RQhdrHandler.HOST_JNO = CommonDataHelper.SpaceString(11);

            data.RQDTL.OPERATE_TYPE = ((int)info.OPERATION_TYPE).ToString();
            data.RQDTL.ACCOUNT_DATE = tradeDate.ToString("yyyyMMdd");
            data.RQDTL.NOTICE_NO = info.NOTICE_NO;
            data.RQDTL.BUSINESS_TYPE = ((int)info.BIZ_TERM_TYPE).ToString();
            if (info.OPERATION_TYPE == AidTypeDefine.INTER_BANK_OPERATION_TYPE.CreateNew)
            {
                data.RQDTL.HANDLE_ORGNAZTION = info.OPERATE_ORGANIZATION;
                data.RQDTL.APPROVE_ORGNAZTION = orgID;
                data.RQDTL.DEPOSIT_TYPE = ((int)info.DEPOSIT_TYPE).ToString();
                data.RQDTL.CURRENT_ACCOUNT = info.CURRENT_ACCOUNT;
                data.RQDTL.INTEREST_ACCOUNT = info.INTEREST_ACCOUNT;
                data.RQDTL.AUTO_REDEPO = info.AUTO_REDEPO ? "1" : "0";
                data.RQDTL.VALUE_DATE = info.VALUE_DATE.ToString("yyyyMMdd");
                data.RQDTL.MATURITY_DATE = info.MATURITY_DATE.ToString("yyyyMMdd");
                data.RQDTL.AMOUNT = info.AMOUNT;
                data.RQDTL.RATE = info.RATE;
                data.RQDTL.INTEREST_BEARING_MANNER = ((int)info.INTEREST_BEARING_MANNER).ToString();
                data.RQDTL.CUSTOMER_CODE = info.CUSTOMER_CODE;
                data.RQDTL.HANDLE_TELLER = tellerNO;
                data.RQDTL.APPROVE_TELLER = tellerNO;
                if (info.BIZ_TERM_TYPE == AidTypeDefine.INTER_BANK_BIZ_TERM_TYPE.Current) // 活期开户
                {
                    data.RQDTL.PRODUCT_TYPE = ((int)AidTypeDefine.INTER_BANK_PROCUDT_CATEGORY_ID.Current).ToString();
                    data.RQDTL.PRODUCT_CODE = ((int)AidTypeDefine.INTER_BANK_PRODUCT_CODE.Current_Fixed).ToString();
                    data.RQDTL.BUSINESS_TYPE = ((int)AidTypeDefine.INTER_BANK_BIZ_TERM_TYPE.Current).ToString();
                }
                else // 定期开户
                {
                    data.RQDTL.PRODUCT_TYPE = ((int)AidTypeDefine.INTER_BANK_PROCUDT_CATEGORY_ID.Fixed).ToString();
                    data.RQDTL.PRODUCT_CODE = ((int)AidTypeDefine.INTER_BANK_PRODUCT_CODE.Current_Fixed).ToString();
                    data.RQDTL.BUSINESS_TYPE = ((int)AidTypeDefine.INTER_BANK_BIZ_TERM_TYPE.Fixed).ToString();
                }
            }

            return MsgTransfer.CodeMsgToBinary(data, ref codemsg);
        }