/// <summary> /// 新增客户接口 /// </summary> /// <param name="tellerNO">操作柜员号</param> /// <param name="organNO">操作柜员所属机构号</param> /// <param name="tradeDate">业务发生时间</param> /// <param name="customer">客户新增的数据对象</param> public static Guid AddCustomer(String tellerNO, String organNO, DateTime tradeDate, ref byte[] codemsg, CoreCustomerBrief customer) { AddCstmData addData = new AddCstmData(); addData.RQhdrHandler.SYS_TXID = "300013"; // 新增,主机启动原交易码 addData.RQhdrHandler.TX_OUNO = organNO; addData.RQhdrHandler.TEL_ID = tellerNO; addData.RQhdrHandler.TX_MODE = "0"; addData.RQhdrHandler.TX_DTE = tradeDate.ToString("yyyy-MM-dd"); addData.RQhdrHandler.SRV_JNO = CommonDataHelper.SpaceString(12); addData.RQhdrHandler.SRV_REV_JNO = CommonDataHelper.SpaceString(12); addData.RQhdrHandler.HOST_JNO = CommonDataHelper.SpaceString(11); addData.RQDTL.CUS_NO = customer.CstmNO; addData.RQDTL.CUS_NAM = customer.CName; addData.RQDTL.CUS_ONAM = customer.OName; addData.RQDTL.CUS_ENAM = customer.EName; addData.RQDTL.ADDR = customer.Address; addData.RQDTL.TEL_NO = customer.TeleNO; addData.RQDTL.MBL_NO = customer.MobileNO; addData.RQDTL.ZIP = customer.ZIP; return MsgTransfer.CodeMsgToBinary(addData, ref codemsg); }
internal static bool OnUpdateCstm(String tellerno, String orgno, DateTime tradedate, String internalcode, CoreCustomerBrief customer, 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.UpdateCustomer(tellerno, orgno, tradedate,internalcode, ref codemsg, customer); reqdata = MsgHandlerEntry.CreateMessageData(msgid, PlatformType.Core, tellerno, orgno, (int)MessageBizType.CoreCstmUpdate, codemsg); #if MQSYNC recdata = MQMsgHandlerEntry.DeliverMessage(reqdata, codemsg, out sent); #else recdata = MsgHandlerEntry.DeliverMessage(MsgHandlerEntry.CreateMessageData(msgid, PlatformType.Core, codemsg)); #endif UpdateCstmData cstmdata = MsgTransfer.DecodeMsg(recdata.MessageID, recdata.CurrentRespPackage.PackageMessage) as UpdateCstmData; if (cstmdata != null) { if (!String.IsNullOrEmpty(cstmdata.OData.CUS_CDE)) { //MQMsgCommonHelper.UpdateMQLog(recdata, null, outmsg, MsgLogState.RecvSucceed, out dbexception); return true; } else { if (!String.IsNullOrEmpty(cstmdata.SyserrHandler.Message)) { outmsg = cstmdata.SyserrHandler.Message; } else if (cstmdata.OmsgHandler.NUM_ENT > 0) { outmsg = MsgHandlerEntry.ExtractOMsg(cstmdata); } } } 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; } }
/// <summary> /// 更新客户 /// </summary> /// <param name="orgno">机构号</param> /// <param name="tellerno">柜员号</param> /// <param name="tradedate">发生日期</param> /// <param name="internalcode">客户内码</param> /// <param name="customer">需更新的客户信息</param> /// <param name="outmsg">出错返回信息</param> /// <returns>更新成功与否</returns> public static bool UpdateCustomer(String orgno, String tellerno, DateTime tradedate, String internalcode, CoreCustomerBrief customer, out String outmsg) { if (ClientSyncHelper.OnUpdateCstm(tellerno, orgno, tradedate, internalcode, customer, out outmsg)) { return true; } outmsg = string.Format("{0}{1}", MsgHandlerEntry.Info_Return_Core, outmsg); return false; }
/// <summary> /// 更新客户接口 /// </summary> /// <param name="tellerNO">操作柜员号</param> /// <param name="organNO">操作柜员所属机构号</param> /// <param name="tradeDate">业务发生时间</param> /// <param name="customer">客户更新的数据对象</param> public static Guid UpdateCustomer(String tellerNO, String organNO, DateTime tradeDate, String interCode, ref byte[] codemsg, CoreCustomerBrief customer) { UpdateCstmData updateData = new UpdateCstmData(); updateData.RQDTL.CUS_CDE = interCode; updateData.RQhdrHandler.SYS_TXID = "300014"; // 查询,主机启动原交易码 updateData.RQhdrHandler.TX_OUNO = organNO; updateData.RQhdrHandler.TEL_ID = tellerNO; updateData.RQhdrHandler.TX_MODE = "0"; updateData.RQhdrHandler.TX_DTE = tradeDate.ToString("yyyy-MM-dd"); updateData.RQhdrHandler.SRV_JNO = CommonDataHelper.SpaceString(12); updateData.RQhdrHandler.SRV_REV_JNO = CommonDataHelper.SpaceString(12); updateData.RQhdrHandler.HOST_JNO = CommonDataHelper.SpaceString(11); updateData.RQDTL.CUS_NAM = customer.CName; updateData.RQDTL.CUS_ONAM = customer.OName; updateData.RQDTL.CUS_ENAM = customer.EName; updateData.RQDTL.ADDR = customer.Address; updateData.RQDTL.TEL_NO = customer.TeleNO; updateData.RQDTL.MBL_NO = customer.MobileNO; updateData.RQDTL.IsDelete = false; return MsgTransfer.CodeMsgToBinary(updateData, ref codemsg); }
private KeyValuePair<Guid, MessageData> GetUpdateCstmData() { String cName = textBoxCName.Text; String oName = textBoxOName.Text; String eName = textBoxEName.Text; String address = textBoxAddress.Text; String telNO = textBoxTelNO.Text; String mblNO = textBoxMblNO.Text; String zip = textBoxZip.Text; String ouno = textBoxOrgNO.Text.TrimStart(); String tellno = textBoxTellerNO.Text.TrimStart(); String interCode = textBoxInterID.Text.TrimStart(); // 临时测试对象 xQuant.AidSystem.BizDataModel.CoreCustomerBrief cstm = new xQuant.AidSystem.BizDataModel.CoreCustomerBrief { CName = cName, OName = oName, EName = eName, Address = address, TeleNO = telNO, MobileNO = mblNO, ZIP = zip }; Guid messageID = MsgTransferUtility.UpdateCustomer(tellno, ouno, DateTime.Now, interCode, ref uLongText, cstm); MessageData msgdata = new MessageData { MessageID = messageID, FirstTime = DateTime.Now, TragetPlatform = PlatformType.Core }; msgdata.ReqPackageList.Enqueue(new PackageData(1, uLongText)); msgdata.IsMultiPackage = false; return new KeyValuePair<Guid, MessageData>(messageID, msgdata); }
private void UpdateDeleteCstm(bool isdelete) { String cName = textBoxCName.Text; String oName = textBoxOName.Text; String eName = textBoxEName.Text; String address = textBoxAddress.Text; String telNO = textBoxTelNO.Text; String mblNO = textBoxMblNO.Text; String zip = textBoxZip.Text; String ouno = textBoxOrgNO.Text.TrimStart(); String tellno = textBoxTellerNO.Text.TrimStart(); String interCode = "83000044566";//textBoxInterID.Text.TrimStart(); // 临时测试对象 xQuant.AidSystem.BizDataModel.CoreCustomerBrief cstm = new xQuant.AidSystem.BizDataModel.CoreCustomerBrief { CName = cName, OName = oName, EName = eName, Address = address, TeleNO = telNO, MobileNO = mblNO, ZIP = zip }; Guid messageID; string outmsg = ""; if (isdelete) { messageID = MsgTransferUtility.DeleteCustomer(tellno, ouno, DateTime.Now, interCode, ref uLongText); } else { bool ret = AidSysClientSyncWrapper.UpdateCustomer(ouno, tellno, DateTime.Now, interCode, cstm, out outmsg); //messageID = MsgTransferUtility.UpdateCustomer(tellno, ouno, DateTime.Now, interCode, ref uLongText, cstm); } //MessageData msgdata = new MessageData { MessageID = messageID, FirstTime = DateTime.Now, TragetPlatform = PlatformType.Core }; //msgdata.ReqPackageList.Enqueue(new PackageData(1, uLongText)); //msgdata.IsMultiPackage = false; //DispatchMsg(msgdata); }
private void buttonAddCstm_Click(object sender, EventArgs e) { String cName = textBoxCName.Text; String oName = textBoxOName.Text; String eName = textBoxEName.Text; String address = textBoxAddress.Text; String telNO = textBoxTelNO.Text; String mblNO = textBoxMblNO.Text; String zip = textBoxZip.Text; String ouno = textBoxOrgNO.Text.TrimStart(); String tellno = textBoxTellerNO.Text.TrimStart(); String interCode = textBoxInterID.Text.TrimStart(); String cstmNO = textBoxCstmNO.Text.TrimStart(); // 临时测试对象 xQuant.AidSystem.BizDataModel.CoreCustomerBrief cstm = new xQuant.AidSystem.BizDataModel.CoreCustomerBrief { CstmNO = cstmNO, CName = cName, OName = oName, EName = eName, Address = address, TeleNO = telNO, MobileNO = mblNO, ZIP = zip }; Guid messageID = MsgTransferUtility.AddCustomer(tellno, ouno, DateTime.Now, ref uLongText, cstm); //StringBuilder sb = new StringBuilder(uLongText.Length); //int len = EBCDICEncoder.EBCDICToWideChar(1388, uLongText, uLongText.Length, sb, sb.Capacity); //this.textBoxRespUpdtCstm.Text = sb.ToString(); MessageData msgdata = new MessageData { MessageID = messageID, FirstTime = DateTime.Now, TragetPlatform = PlatformType.Core }; msgdata.ReqPackageList.Enqueue(new PackageData(1, uLongText)); msgdata.IsMultiPackage = false; DispatchMsg(msgdata); }
/// <summary> /// 更新客户接口 /// </summary> /// <param name="tellerNO">操作柜员号</param> /// <param name="organNO">操作柜员所属机构号</param> /// <param name="tradeDate">业务发生时间</param> /// <param name="customer">客户更新的数据对象</param> public static Guid UpdateCustomer(String tellerNO, String organNO, DateTime tradeDate, String interCode, ref byte[] codemsg, CoreCustomerBrief customer) { UpdateCstmData updateData = new UpdateCstmData(); updateData.RQDTL.CUS_CDE = interCode; updateData.RQhdrHandler.SYS_TXID = "300014"; // 查询,主机启动原交易码 updateData.RQhdrHandler.TX_OUNO = organNO; updateData.RQhdrHandler.TEL_ID = tellerNO; updateData.RQhdrHandler.TX_MODE = "0"; updateData.RQhdrHandler.TX_DTE = tradeDate.ToString("yyyy-MM-dd"); updateData.RQhdrHandler.SRV_JNO = CommonDataHelper.SpaceString(12); updateData.RQhdrHandler.SRV_REV_JNO = CommonDataHelper.SpaceString(12); updateData.RQhdrHandler.HOST_JNO = CommonDataHelper.SpaceString(11); updateData.RQDTL.CUS_NAM = customer.CName; updateData.RQDTL.CUS_ONAM = customer.OName; updateData.RQDTL.CUS_ENAM = customer.EName; updateData.RQDTL.ADDR = customer.Address; updateData.RQDTL.TEL_NO = customer.TeleNO; updateData.RQDTL.MBL_NO = customer.MobileNO; updateData.RQDTL.IsDelete = false; try { return PreProcessReqMsg(updateData, ref codemsg); } catch (Exception ex) { throw new Exception(MESSAGE_ENCODE_EXCEPTION, ex); } }
/// <summary> /// 新增客户接口 /// </summary> /// <param name="tellerNO">操作柜员号</param> /// <param name="organNO">操作柜员所属机构号</param> /// <param name="tradeDate">业务发生时间</param> /// <param name="customer">客户新增的数据对象</param> public static Guid AddCustomer(String tellerNO, String organNO, DateTime tradeDate, ref byte[] codemsg, CoreCustomerBrief customer) { AddCstmData addData = new AddCstmData(); addData.RQhdrHandler.SYS_TXID = "300013"; // 新增,主机启动原交易码 addData.RQhdrHandler.TX_OUNO = organNO; addData.RQhdrHandler.TEL_ID = tellerNO; addData.RQhdrHandler.TX_MODE = "0"; addData.RQhdrHandler.TX_DTE = tradeDate.ToString("yyyy-MM-dd"); addData.RQhdrHandler.SRV_JNO = CommonDataHelper.SpaceString(12); addData.RQhdrHandler.SRV_REV_JNO = CommonDataHelper.SpaceString(12); addData.RQhdrHandler.HOST_JNO = CommonDataHelper.SpaceString(11); addData.RQDTL.CUS_NO = customer.CstmNO; addData.RQDTL.CUS_NAM = customer.CName; addData.RQDTL.CUS_ONAM = customer.OName; addData.RQDTL.CUS_ENAM = customer.EName; addData.RQDTL.ADDR = customer.Address; addData.RQDTL.TEL_NO = customer.TeleNO; addData.RQDTL.MBL_NO = customer.MobileNO; addData.RQDTL.ZIP = customer.ZIP; try { return PreProcessReqMsg(addData, ref codemsg); } catch (Exception ex) { throw new Exception(MESSAGE_ENCODE_EXCEPTION, ex); } }