Beispiel #1
0
        public override void DoResponse <T>(string host, string url, T param, int execCount)
        {
            ReturnBody <string> resultModelForPredictiveTask = null;

            resultModelForPredictiveTask = WipRequestHelper.CommonHttpRequestForGet <T, string>(host,
                                                                                                url, param, 180); //超时时间设定为3分钟
            if (resultModelForPredictiveTask != null && resultModelForPredictiveTask.resCode == ResCode.SUCCESS)
            {                                                                                                     //成功
                _ResponseUpdaterRet.execResult = true;
            }
            else
            {
                _ResponseUpdaterRet.execResult             = false;
                _ResponseUpdaterRet.exception.exceptionMsg = "执行次数:" + execCount.ToString() + ",resultModelForPredictiveTask:" + JsonConvert.SerializeObject(resultModelForPredictiveTask);
            }
        }
Beispiel #2
0
        public virtual void DoResponse <T>(string host, string url, T param, int execCount)
        {
            ReturnBody <string> resultModel = null;

            resultModel = WipRequestHelper.CommonHttpRequestForPost <T, string>(host,
                                                                                url, param);
            if (resultModel != null && resultModel.resCode == ResCode.SUCCESS)
            {//成功
                _ResponseUpdaterRet.execResult = true;
            }
            else
            {
                _ResponseUpdaterRet.execResult             = false;
                _ResponseUpdaterRet.exception.exceptionMsg = "执行次数:" + execCount.ToString()
                                                             + ",系统返回结果:" + JsonConvert.SerializeObject(resultModel);
            }
        }
        public override void DoResponse <T>(string host, string url, T param, int execCount)
        {
            ReturnBody <PushProcessCardInfoToWCSModel> resultByPushProcessCardInfoToWCSView = null;

            resultByPushProcessCardInfoToWCSView = WipRequestHelper.CommonHttpRequestForPost <T, PushProcessCardInfoToWCSModel>(host,
                                                                                                                                url, param);
            if (resultByPushProcessCardInfoToWCSView != null && resultByPushProcessCardInfoToWCSView.resCode == ResCode.SUCCESS &&
                resultByPushProcessCardInfoToWCSView.resData != null &&
                !string.IsNullOrEmpty(resultByPushProcessCardInfoToWCSView.resData.success) && resultByPushProcessCardInfoToWCSView.resData.success.ToUpper() == "Y")
            {//成功
                _ResponseUpdaterRet.execResult = true;
            }
            else
            {
                _ResponseUpdaterRet.execResult             = false;
                _ResponseUpdaterRet.exception.exceptionMsg = "执行次数:" + execCount.ToString() + ",resultByPushProcessCardInfoToWCSView:" + JsonConvert.SerializeObject(resultByPushProcessCardInfoToWCSView);
            }
        }