zhoufan 3 年之前
父節點
當前提交
4a70b1e9cf

+ 11 - 0
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/App_Start/ErrorAttribute.cs

@@ -1,5 +1,7 @@
1 1
 using CallCenter.Utility;
2 2
 using System.Collections.Generic;
3
+using System.IO;
4
+using System.Text;
3 5
 using System.Web.Mvc;
4 6
 
5 7
 namespace CallCenterApi.Interface
@@ -40,6 +42,15 @@ namespace CallCenterApi.Interface
40 42
                     Params.Add(key, rt.Params[key]);
41 43
                 }
42 44
             }
45
+
46
+            if (rt.ContentLength > 0)
47
+            {
48
+                rt.InputStream.Position = 0;
49
+                StreamReader reader = new StreamReader(rt.InputStream);
50
+                string postString = reader.ReadToEnd();
51
+                Params.Add("InputStream", postString);
52
+            }
53
+
43 54
             string usercode = cnt.User?.Identity.Name ?? "";
44 55
 
45 56
             log.Error("系统异常,操作账号:" + usercode + ",请求信息:" + Params.ToJson(), context.Exception);

+ 13 - 13
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/AffairsController.cs

@@ -2647,15 +2647,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
2647 2647
         public ActionResult case_record(string WorkOrderId)
2648 2648
         {
2649 2649
             var workorder = workorderBLL.GetModel(WorkOrderId);
2650
-           
2651
-            var model = new BLL.T_Call_CallRecords().GetModelByCallId(workorder.F_CallId );
2652
-          
2653
-            if (model != null )
2650
+
2651
+            var model = new BLL.T_Call_CallRecords().GetModelByCallId(workorder.F_CallId);
2652
+
2653
+            if (model != null)
2654 2654
             {
2655 2655
                 string token = GetToken();
2656 2656
                 if (string.IsNullOrEmpty(token))
2657
-                    return Error ("获取token失败");
2658
-               
2657
+                    return Error("获取token失败");
2658
+
2659 2659
                 submit_case_record paras = new submit_case_record();
2660 2660
                 paras.jsonList = new List<record>();
2661 2661
                 record jsonList = new record();
@@ -2702,8 +2702,8 @@ namespace CallCenterApi.Interface.Controllers.workorder
2702 2702
                 jsonList.RECORD_LENGTH = model.TalkLongTime;
2703 2703
                 jsonList.RECORD_LOGINID = model.UserCode;
2704 2704
                 var config = new BLL.T_Sys_SystemConfig().GetModelList(" F_ParamCode='PlayPath' ").FirstOrDefault();
2705
-               
2706
-                if (config != null && !string.IsNullOrEmpty(config.F_ParamValue) && model.FilePath!=null )
2705
+
2706
+                if (config != null && !string.IsNullOrEmpty(config.F_ParamValue) && model.FilePath != null)
2707 2707
                 {
2708 2708
                     var ym = config.F_ParamValue;
2709 2709
                     if (ym.Substring(ym.Length - 1) == "/")
@@ -2723,9 +2723,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
2723 2723
                 ////序列化参数
2724 2724
                 //var jsonParam = JsonConvert.SerializeObject(values);
2725 2725
                 string jsonParam = "access_token=" + token + "&paras=" + paras.ToJson();
2726
-               
2726
+
2727 2727
                 var responseString = HttpMethods.HttpPost("http://59.227.104.19:8000/share/submit_case_record", jsonParam);
2728
-                
2728
+
2729 2729
                 Push jo = JsonConvert.DeserializeObject<Push>(responseString);
2730 2730
                 if (jo.code == "1")
2731 2731
                 {
@@ -2765,9 +2765,9 @@ namespace CallCenterApi.Interface.Controllers.workorder
2765 2765
 
2766 2766
                 }
2767 2767
             }
2768
-            else 
2769
-            return Error("通话记录不存在");
2770
-            return Error("通话记录不存在");
2768
+            else
2769
+                return Error("通话记录不存在");
2770
+            return Error("推送成功");
2771 2771
         }
2772 2772
         #endregion
2773 2773
         #endregion