Browse Source

通话记录添加来电单位关键词搜索

lihai 6 years ago
parent
commit
bac6ebcbee

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

@@ -35,6 +35,7 @@ namespace CallCenterApi.Interface.Controllers.tel
35 35
                 deptid = CurrentUser.UserData.F_DeptId;
36 36
                 deptcode = CurrentUser.UserData.F_DeptCode;
37 37
             }
38
+            string telunit = HttpUtility.UrlDecode(RequestString.GetQueryString("telunit"));
38 39
             string callstate = HttpUtility.UrlDecode(RequestString.GetQueryString("callstate"));
39 40
             string calltype = HttpUtility.UrlDecode(RequestString.GetQueryString("calltype"));
40 41
             string starttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
@@ -121,7 +122,7 @@ namespace CallCenterApi.Interface.Controllers.tel
121 122
             }
122 123
             if (dept != null && dept.Trim() != "")
123 124
             {
124
-                sql += " and UserCode in (select F_UserCode from T_Sys_UserAccount where F_DeptId=" + dept.Trim() + ")";
125
+                sql += " and UserCode in (select F_UserCode from T_Sys_UserAccount WITH(NOLOCK) where F_DeptId=" + dept.Trim() + ")";
125 126
             }
126 127
             if (dealtype != null && dealtype.Trim() != "")
127 128
             {
@@ -132,6 +133,10 @@ namespace CallCenterApi.Interface.Controllers.tel
132 133
             {
133 134
                 sql += " and CallNumber like '%" + phone + "%'";
134 135
             }
136
+            if (telunit != null && telunit.Trim() != "")
137
+            {
138
+                sql += " and CallNumber IN (SELECT F_Telephone FROM T_Cus_CustomerBase WITH(NOLOCK) WHERE F_CustomerIndustry LIKE '%" + telunit.Trim() + "%' and F_DeleteFlag=0) ";
139
+            }
135 140
             if (callstate.Trim() != "")
136 141
             {
137 142
                 sql += " and CallState='" + callstate + "'";
@@ -160,7 +165,7 @@ namespace CallCenterApi.Interface.Controllers.tel
160 165
             }
161 166
             int recordCount = 0;
162 167
             dt = BLL.PagerBLL.GetListPager(
163
-                "T_Call_CallRecords left join T_Sys_UserAccount on UserCode=F_UserCode",
168
+                "T_Call_CallRecords WITH(NOLOCK) left join T_Sys_UserAccount on UserCode=F_UserCode",
164 169
                 "CallRecordsId",
165 170
                 "T_Call_CallRecords.*,T_Sys_UserAccount.F_SeartGroup",
166 171
                 sql,