private void DoSend(RequestParam request, ResponseParam response, AbstractActionHandler handlerChain) { this.request = request; this.response = response = new ResponseParam(); this.DoSendAction(request, response); }
/// <summary> /// 发送清空banner事件 /// </summary> /// <param name="request"></param> /// <param name="response"></param> protected override void DoSendAction(RequestParam request, ResponseParam response) { Dictionary <string, object> dataDic = new Dictionary <string, object>(); dataDic.Add(OpOperateActionEvent.CLEAR_BANNER, request.actionName); this.FireBizEventSent(this, OpOperateActionEvent.CLEAR_BANNER, null, dataDic); }
private void UpdateChatSessionResponse(ResponseParam response) { if (response.post_data.Length > 0) { SendMessage("Update" + (chatSessionUrl.Length == 1 ? "Public" : "Private") + "ChatSession", response); } }
/// <summary> /// 传染病上报 /// </summary> /// <param name="request"></param> protected override void DoSendAction(RequestParam request, ResponseParam response) { ReportCardFillJudge report = new ReportCardFillJudge(request.ent4BannerDTO); bool fg = report.IsInfectionReport(); this.DoReceiveAction(this.request, this.response); }
/// <summary> /// 执行诊毕操作,并调用下一个处理环节 /// </summary> /// <param name="request"></param> protected override void DoSendAction(RequestParam request, ResponseParam response) { string idEnt = request.ent4BannerDTO.Id_ent; ienOutCmdService.DiagnoseFinish(idEnt); // 诊毕结束掉下一个链中下一个处理节点 this.DoReceiveAction(request, response); }
public void GoodResponse(API api) { ResponseParam response = ParseResponse(api); if (response != null) { response.uri = api.uri; response.seed = api.seed; response.post_id = api.jsonReturn; SendMessage(api.rFuncName, response); } }
/// <summary> /// 接收反馈结果,继续下几个节点的执行 /// </summary> /// <param name="request">请求参数</param> /// <param name="response">返回参数</param> protected void DoReceiveAction(RequestParam request, ResponseParam response) { if (handlerChain == null) { return; } if (response != null && response.SuccFlag == FBoolean.False) { this.ShowMessage(response.msg); return; } handlerChain.DoSend(request, response, this.handlerChain); }
/// <summary> /// 执行事件链中各个节点 /// </summary> /// <param name="request"></param> /// <param name="responseParam"></param> /// <param name="handler"></param> public void DoSendAction(RequestParam request, ResponseParam response, AbstractActionHandler handler) { if (handler == null) { return; } this.request = request; if (!this.validate(this.request)) { return; } response = new ResponseParam(); handler.DoSendAction(this.request, this.response); }
public void ParseError(API api) { if (api.errorCode == 502) { api.errorMsg = new string[] { "API OTP is empty.", "API OTP kosong." }; } else if (api.errorCode == 503) { api.errorMsg = new string[] { "API Player ID is empty.", "API Player ID kosong." }; } else if (api.errorCode == 504) { api.errorMsg = new string[] { "API Token is empty.", "API Token kosong." }; } ResponseParam response = new ResponseParam(); response.error_code = api.errorCode; response.error_msg = api.errorMsg; response.uri = api.uri; response.seed = api.seed; SendMessage("RErrorHandler", response); }
//======================================================================================================================= //Error Handling private ResponseParam ParseResponse(API api) { ResponseParam response = new ResponseParam(); if (api.isDigested == -1) //Return Process For Template File { response.post_data = api.jsonReturn; } else { response = JsonUtility.FromJson <ResponseParam> (api.jsonReturn); if (response.error_code > 0) { api.errorCode = response.error_code; api.errorMsg = response.error_msg; ParseError(api); return(null); } response.post_time = (Convert.ToInt32(response.post_time) - Convert.ToInt32(response.request_time)).ToString() + " sec(s)"; response.post_data = PostData(response.post_id, response.post_data); } return(response); }
private int StartChatSessionResponse(ResponseParam response) { if (response.post_data.Length > 0) { try { long index = long.Parse(response.post_data); if (index > chatSession) { chatSession = index; PlayerPrefs.SetInt((chatSessionUrl.Length == 1 ? "publicChatSession" : "privateChatSession"), (int)chatSession); string defaultNotFound = "{\"chat\":[]}"; API api = new API("chat" + chatSessionUrl + "chat.ray", "UpdateChatSessionResponse", "", -1); StartCoroutine(Congest.ReadTempFile(this, api, defaultNotFound)); return(api.seed); } } catch (Exception e) { Debug.Log(e.Message); } } return(0); }
private int StartAnnouncementSessionResponse(ResponseParam response) { if (response.post_data.Length > 0) { try { int index = int.Parse(response.post_data); if (index > announcementSession) { announcementSession = index; PlayerPrefs.SetInt("announcementSession", announcementSession); string defaultNotFound = "{\"announcement\":[]}"; API api = new API("announcement.ray", "UpdateAnnouncementSession", "", -1); StartCoroutine(Congest.ReadTempFile(this, api, defaultNotFound)); return(api.seed); } } catch (Exception e) { Debug.Log(e.Message); } } return(0); }
/// <summary> /// 对外发送病历签名事件 /// </summary> /// <param name="request"></param> /// <param name="response"></param> protected override void DoSendAction(RequestParam request, ResponseParam response) { this.FireBizEventSent(this, OpOperateActionEvent.EMR_SIGN_NAME, OpOperateActionEvent.EMR_SIGN_NAME_RESULT, null); }
/// <summary> /// /// </summary> /// <param name="request"></param> protected override void DoSendAction(RequestParam request, ResponseParam response) { this.FireBizEventSent(this, OpActionConstant.OP_COMPLETE_DI_SEND_ACTION, OpActionConstant.OP_COMPLETE_DI_RECEIVE_ACTION, null); }
protected override void DoSendAction(RequestParam request, ResponseParam response) { this.FireBizEventSent(this, OpActionConstant.EN_PAT_CANCEL, null, null); this.DoReceiveAction(request, response); }
protected override void DoSendAction(RequestParam request, ResponseParam response) { this.FireBizEventSent(this, OpOperateActionEvent.BANNER_SWITCH_USER_EVENT, null, null); }
/// <summary> /// 发送加载打印中心事件 /// </summary> /// <param name="request"></param> protected override void DoSendAction(RequestParam request, ResponseParam response) { this.FireBizEventSent(this, OpActionConstant.OP_COMPLETE_PRINT_ACTION, OpOperateActionEvent.PRINT_COMPLETE, null); }
protected override void DoSendAction(RequestParam request, ResponseParam response) { this.FireBizEventSent(this, OpOperateActionEvent.EN_PAT_SUSPEND, null, null); this.DoReceiveAction(request, response); }
/// <summary> /// /// </summary> /// <param name="request"></param> protected override void DoSendAction(RequestParam request, ResponseParam response) { this.FireBizEventSent(this, OpActionConstant.OP_DI_RESPONSE_SEND_OR_SIGN_ACTION, null, null); this.DoReceiveAction(request, response); }
/// <summary> /// 子类处理业务逻辑方法 /// </summary> /// <param name="request">请求参数</param> /// <param name="response">返回参数</param> protected abstract void DoSendAction(RequestParam request, ResponseParam response);
protected override void DoSendAction(RequestParam request, ResponseParam response) { this.FireBizEventSent(this, OpOperateActionEvent.EMR_BANNER_SWITCHING_USER, null, null); this.DoReceiveAction(request, response); }