Sfoglia il codice sorgente

调整通话记录状态查询

zhengbingbing 7 anni fa
parent
commit
e50d4fdae1

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

58
             }
58
             }
59
             if (callstate.Trim() != "")
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
             if (calltype.Trim() != "")
81
             if (calltype.Trim() != "")
64
             {
82
             {
206
                 }
224
                 }
207
                 if (callstate.Trim() != "")
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
                 if (calltype.Trim() != "")
247
                 if (calltype.Trim() != "")
212
                 {
248
                 {