Parcourir la Source

调整通话记录状态查询

zhengbingbing il y a 7 ans
Parent
commit
e50d4fdae1

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

@@ -58,7 +58,25 @@ namespace CallCenterApi.Interface.Controllers.tel
58 58
             }
59 59
             if (callstate.Trim() != "")
60 60
             {
61
-                sql += " and CallState='" + callstate + "'";
61
+                switch(callstate)
62
+                {
63
+                    case "0"://未接通 包含呼出未接通和呼入坐席未接听记录
64
+                        sql += " and ((CallType='1' and CallState='0') or (CallType='0' and CallState='0' and DealType='5') ) ";
65
+                        break;
66
+                    case "1"://骚扰挂断
67
+                        sql += " and CallType='0' and CallState='0' and DealType='0' ";
68
+                        break;
69
+                    case "2"://黑名单
70
+                        sql += " and CallType='0' and CallState='0' and DealType='1' ";
71
+                        break;
72
+                    case "3"://自助服务
73
+                        sql += " and CallType='0' and CallState='0' and DealType='2' ";
74
+                        break;
75
+                    case "4"://已接通
76
+                        sql += " and CallState='1' ";
77
+                        break;
78
+                }
79
+                //sql += " and CallState='" + callstate + "'";
62 80
             }
63 81
             if (calltype.Trim() != "")
64 82
             {
@@ -206,7 +224,25 @@ namespace CallCenterApi.Interface.Controllers.tel
206 224
                 }
207 225
                 if (callstate.Trim() != "")
208 226
                 {
209
-                    sql += " and CallState='" + callstate + "'";
227
+                    switch (callstate)
228
+                    {
229
+                        case "0"://未接通 包含呼出未接通和呼入坐席未接听记录
230
+                            sql += " and ((CallType='1' and CallState='0') or (CallType='0' and CallState='0' and DealType='5') ) ";
231
+                            break;
232
+                        case "1"://骚扰挂断
233
+                            sql += " and CallType='0' and CallState='0' and DealType='0' ";
234
+                            break;
235
+                        case "2"://黑名单
236
+                            sql += " and CallType='0' and CallState='0' and DealType='1' ";
237
+                            break;
238
+                        case "3"://自助服务
239
+                            sql += " and CallType='0' and CallState='0' and DealType='2' ";
240
+                            break;
241
+                        case "4"://已接通
242
+                            sql += " and CallState='1' ";
243
+                            break;
244
+                    }
245
+                    //sql += " and CallState='" + callstate + "'";
210 246
                 }
211 247
                 if (calltype.Trim() != "")
212 248
                 {