Przeglądaj źródła

高层审批状态修改,来电弹屏历史记录增加客户姓名,通话记录增加客户姓名

duhongyu 6 lat temu
rodzic
commit
ce1f0faea0

+ 48 - 4
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/SMSController.cs

@@ -20,10 +20,54 @@ namespace CallCenterApi.Interface.Controllers
20 20
         // 需要发送短信的手机号码
21 21
         string[] phoneNumbers = { "21212313123", "12345678902", "12345678903" };
22 22
         // 短信模板ID,需要在短信应用中申请
23
-        int templateId = 7839; // NOTE: 这里的模板ID`7839`只是一个示例,真实的模板ID需要在短信控制台中申请
23
+        int templateId = 225505; // NOTE: 这里的模板ID`7839`只是一个示例,真实的模板ID需要在短信控制台中申请
24 24
         // 签名
25
-        string smsSign = "腾讯云"; // NOTE: 这里的签名只是示例,请使用真实的已申请的签名, 签名参数使用的是`签名内容`,而不是`签名ID`
25
+        string smsSign = "河南心连心客服"; // NOTE: 这里的签名只是示例,请使用真实的已申请的签名, 签名参数使用的是`签名内容`,而不是`签名ID`
26 26
         #endregion
27
+        public ActionResult SMSSend()
28
+        {
29
+            SmsSingleSenderResult result = SMSSingleshot("17839539537", "测试");
30
+                if (result !=null )
31
+            {
32
+
33
+                return Success("根据关键字获取公司信息",   result);
34
+            }
35
+                else
36
+            {
37
+                return null;
38
+            }
39
+        }
40
+        /// <summary>
41
+        /// 指定模板单发短信
42
+        /// </summary>
43
+        /// <param name="phone"></param>
44
+        /// <param name="cont"></param>
45
+        public SmsSingleSenderResult SMSSinglesho(string phone, string cont)
46
+        {
47
+            try
48
+            {
49
+                SmsSingleSender ssender = new SmsSingleSender(appid, appkey);
50
+                var result = ssender.sendWithParam("86", phone,
51
+                    templateId, new[] { cont }, smsSign, "", "");  // 签名参数未提供或者为空时,会使用默认签名发送短信
52
+                Console.WriteLine(result);
53
+                return result;
54
+            }
55
+            catch (JSONException e)
56
+            {
57
+                Console.WriteLine(e);
58
+                return null;
59
+            }
60
+            catch (HTTPException e)
61
+            {
62
+                Console.WriteLine(e);
63
+                return null;
64
+            }
65
+            catch (Exception e)
66
+            {
67
+                Console.WriteLine(e);
68
+                return null;
69
+            }
70
+        }
27 71
         /// <summary>
28 72
         /// 单发短信
29 73
         /// </summary>
@@ -34,8 +78,8 @@ namespace CallCenterApi.Interface.Controllers
34 78
             try
35 79
             {
36 80
                 SmsSingleSender ssender = new SmsSingleSender(appid, appkey);
37
-                var result = ssender.send(0, "86", phone,
38
-                    cont, "", "");
81
+                var result = ssender.send(1, "86", phone,
82
+                 smsSign, cont, "");
39 83
                 Console.WriteLine(result);
40 84
                 return result;
41 85
             }

+ 11 - 1
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallInScreenController.cs

@@ -338,7 +338,17 @@ namespace CallCenterApi.Interface.Controllers.tel
338 338
                                 }
339 339
                                 dr["FilePath"] = ym + path.Substring(path.IndexOf(':') + 1).Replace('\\', '/');
340 340
                             }
341
-                            dr["CusName"] = new BLL.T_Cus_CustomerBaseNew().GetModelList($" ( F_CompanyName like '%" + dr["CallNumber"] + "%' or F_CustomerCode like '%" + dr["CallNumber"] + "%' ) ");
341
+                            string tephone = dr["CallNumber"] != null ? dr["CallNumber"].ToString() : "";
342
+                            if (!string.IsNullOrEmpty(tephone))
343
+                            {
344
+                                Model.T_Cus_CustomerBaseNew cus = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_LegalPhone ='" + tephone + "'  ")
345
+                     .FirstOrDefault();
346
+                                if (cus != null)
347
+                                {
348
+                                    dr["CusName"] = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_LegalPhone ='" + tephone + "'  ")
349
+                           .FirstOrDefault().F_Legal;
350
+                                }
351
+                            }
342 352
                         }
343 353
 
344 354
                         int hrcount = new BLL.T_Call_CallRecords().GetRecordCount(" calltype=0 " + sqlcount);

+ 12 - 2
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/tel/CallrecordsController.cs

@@ -184,6 +184,7 @@ namespace CallCenterApi.Interface.Controllers.tel
184 184
                 }
185 185
                 string ucode = dr["UserCode"] != null ? dr["UserCode"].ToString() : "";
186 186
                 string uname = dr["UserName"] != null ? dr["UserName"].ToString() : "";
187
+                string tephone= dr["CallNumber"] != null ? dr["CallNumber"].ToString() : "";
187 188
                 if (ucode != "")
188 189
                 {
189 190
                     if (uname == "")
@@ -193,8 +194,17 @@ namespace CallCenterApi.Interface.Controllers.tel
193 194
                             dr["UserName"] = uu.F_UserName;
194 195
                     }
195 196
                 }
196
-                dr["CusName"] = new BLL.T_Cus_CustomerBaseNew().GetModelList($" ( F_CompanyName like '%" + dr["CallNumber"] + "%' or F_CustomerCode like '%" + dr["CallNumber"] + "%' ) ")
197
-                  .FirstOrDefault().F_Legal;
197
+                if (!string.IsNullOrEmpty(tephone))
198
+                {
199
+                    Model.T_Cus_CustomerBaseNew cus = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_LegalPhone ='" + tephone + "'  ")
200
+         .FirstOrDefault();
201
+                    if (cus != null)
202
+                    {
203
+                        dr["CusName"] = new BLL.T_Cus_CustomerBaseNew().GetModelList(" F_LegalPhone ='" + tephone + "'  ")
204
+               .FirstOrDefault().F_Legal;
205
+                    }
206
+                }
207
+
198 208
             }
199 209
 
200 210
             var obj = new

+ 9 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/weixin/WxLoginController.cs

@@ -3230,6 +3230,15 @@ namespace CallCenterApi.Interface.Controllers.weixin
3230 3230
                     //验证信息
3231 3231
                     if (model != null)
3232 3232
                     {
3233
+                        var itemlast = itembll.GetModelList("  F_ItemType=" + (int)EnumItemType.audit + " and  F_OptType=" + (int)EnumItemOpt.audit + "and F_NextUser= '" + ua.F_UserCode + "'" + "and F_IsUsed=2  and  F_WoID = " + orderid);
3234
+                        if (itemlast.Count > 0)
3235
+                        {
3236
+                            foreach (var it in itemlast)
3237
+                            {
3238
+                                it.F_IsUsed = 1;
3239
+                                itembll.Update(it);
3240
+                            }
3241
+                        }
3233 3242
                         model.F_Highopinions = cont;
3234 3243
                         string deptname = "";
3235 3244
                         var deptmodel = departmentBLL.GetModel(ua.F_DeptId);

+ 9 - 0
codegit/CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderNewController.cs

@@ -4865,6 +4865,15 @@ namespace CallCenterApi.Interface.Controllers.workorder
4865 4865
                     //验证信息
4866 4866
                     if (model != null)
4867 4867
                     {
4868
+                        var itemlast = itembll.GetModelList("  F_ItemType=" + (int)EnumItemType.audit + " and  F_OptType=" + (int)EnumItemOpt.audit + "and F_NextUser= '" + ua.F_UserCode  + "'" + "and F_IsUsed=2  and  F_WoID = " + orderid );
4869
+                            if (itemlast.Count > 0)
4870
+                            {
4871
+                                foreach (var it in itemlast)
4872
+                                {
4873
+                                    it.F_IsUsed = 1;
4874
+                                    itembll.Update(it);
4875
+                                }
4876
+                            }
4868 4877
                         model.F_Highopinions = cont;
4869 4878
                         string deptname = "";
4870 4879
                         var deptmodel = departmentBLL.GetModel(ua.F_DeptId);