private void ForTestReturn(InterBankDeleteAcctData ibData, StringBuilder result) { if (ibData == null) { result.AppendFormat("The Core's result object is null!"); } else { result.AppendFormat("Core Status:{0}", ibData.RPhdrHandler.STATUS); if (ibData.SyserrHandler.Message != null) { result.AppendLine(); result.AppendFormat("SYSERROR:{0};", ibData.SyserrHandler.Message); } if (ibData.OmsgHandler.OMSGItemList != null && ibData.OmsgHandler.OMSGItemList.Count > 0) { result.AppendLine(); result.AppendFormat("OMSG:{0};", ibData.OmsgHandler.OMSGItemList[0].MSG_TEXT); } } MessageBox.Show(result.ToString()); }
/// <summary> /// 活期定期销户 /// </summary> /// <param name="info"></param> /// <param name="codemsg"></param> /// <returns></returns> public static Guid DeleteAccount(string orgID, string tellerNO, DateTime tradeDate, InterBankDeleteAcctInfo info, ref byte[] codemsg) { InterBankDeleteAcctData data = new InterBankDeleteAcctData(); data.RQhdrHandler.SYS_TXID = "415661"; // 新增,主机启动原交易码 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.NOTICE_TYPE = ((int)info.NOTICE_TYPE).ToString(); data.RQDTL.BUSINESS_TYPE = ((int)info.TERM_TYPE).ToString(); if (info.OPERATION_TYPE == AidTypeDefine.INTER_BANK_OPERATION_TYPE.CreateNew) { data.RQDTL.HANDLE_ORGNAZTION = string.IsNullOrEmpty(info.OPERATE_ORGANIZATION) ? orgID : info.OPERATE_ORGANIZATION; data.RQDTL.APPROVE_ORGNAZTION = orgID; data.RQDTL.ACCOUNT = info.ACCOUNT; data.RQDTL.INTEREST_ACCOUNT = info.INTEREST_ACCOUNT; data.RQDTL.AMOUNT = info.AMOUNT; data.RQDTL.INTEREST = info.INTEREST; data.RQDTL.HANDLE_TELLER = tellerNO; data.RQDTL.APPROVE_TELLER = tellerNO; data.RQDTL.DETAILS = new List<DetailInfo>(); foreach (var item in info.DETAILS) { DetailInfo detailInfo = new DetailInfo(); detailInfo.VALUE_DATE = item.VALUE_DATE.ToString("yyyyMMdd"); detailInfo.MATURITY_DATE = item.MATURITY_DATE.ToString("yyyyMMdd"); detailInfo.RATE = item.RATE; detailInfo.CHARGE_NUMBER = item.CHARGE_NUMBER; detailInfo.INTEREST = item.INTEREST; data.RQDTL.DETAILS.Add(detailInfo); } data.RQDTL.DETAIL_NUMBER = info.DETAILS.Count; for (int i = 0; i < (data.RQDTL.AIStruct_WIDTH - info.DETAILS.Count); i++) { DetailInfo detailInfo = new DetailInfo(); data.RQDTL.DETAILS.Add(detailInfo); } } return MsgTransfer.CodeMsgToBinary(data, ref codemsg); }