public HttpResponseMessage GetBjdDetailFromHistory([FromUri] GetBjdDetailFromHistoryRequest request) { logInfo.Info(string.Format("从历史获取报价详情接口请求串:{0}", Request.RequestUri)); var viewModel = new MyBaoJiaViewModel(); if (!ModelState.IsValid) { viewModel.BusinessStatus = -10000; string msg = ModelState.Values.Where(a => a.Errors.Count == 1).Aggregate(string.Empty, (current, a) => current + (a.Errors[0].ErrorMessage + "; ")); viewModel.StatusMessage = "输入参数错误," + msg; return(viewModel.ResponseToJson()); } try { MyBaoJiaViewModel response = new MyBaoJiaViewModel(); response = _bjdService.GetBjdDetailFromHistory(request, Request.GetQueryNameValuePairs()); viewModel = response; viewModel.BusinessStatus = 1; } catch (Exception ex) { logError.Info("获取报价单详情接口发生异常:" + ex.Source + "\n" + ex.StackTrace + "\n" + ex.Message + "\n" + ex.InnerException); } return(viewModel.ResponseToJson()); }
public HttpResponseMessage GetMyBjdDetail([FromUri] GetMyBjdDetailRequest request) { string traceId = LogAssistant.GetRequestHeaders(Request, "TraceId"); BHFunctionLog fucnLog = LogAssistant.GenerateBHFuncLog(traceId, "service层获取获取我的报价单接口", "GetMyBjdDetail", 1); logInfo.Info(string.Format("获取我的报价单详情接口请求串:{0}", Request.RequestUri)); var viewModel = new MyBaoJiaViewModel(); if (!ModelState.IsValid) { viewModel.BusinessStatus = -10000; string msg = ModelState.Values.Where(a => a.Errors.Count == 1).Aggregate(string.Empty, (current, a) => current + (a.Errors[0].ErrorMessage + "; ")); viewModel.StatusMessage = "输入参数错误," + msg; return(viewModel.ResponseToJson()); } try { MyBaoJiaViewModel response = new MyBaoJiaViewModel(); AspectF.Define.InfoFunctionLog(fucnLog).Do(() => { response = _bjdService.GetMyBjdDetail(request, Request.GetQueryNameValuePairs()); }); viewModel = response; } catch (Exception ex) { logError.Info("获取报价单详情接口发生异常:" + ex.Source + "\n" + ex.StackTrace + "\n" + ex.Message + "\n" + ex.InnerException); } return(viewModel.ResponseToJson()); }
public HttpResponseMessage GetPrecisePriceDetail([FromUri] GetMyBjdDetailRequest request) { _logAppInfo.Info(string.Format("获取报价详情接口请求串:{0}", Request.RequestUri)); var viewModel = new MyBaoJiaViewModel(); if (!ModelState.IsValid) { viewModel.BusinessStatus = -10000; string msg = ModelState.Values.Where(a => a.Errors.Count == 1).Aggregate(string.Empty, (current, a) => current + (a.Errors[0].ErrorMessage + "; ")); viewModel.StatusMessage = "输入参数错误," + msg; return(viewModel.ResponseToJson()); } viewModel = _appAchieveService.GetPrecisePriceDetail(request, Request.GetQueryNameValuePairs(), Request.RequestUri); //_logAppInfo.Info(string.Format("获取报价详情接口返回值:{0}", viewModel.ToJson())); return(viewModel.ResponseToJson()); }