duhongyu лет назад: 3
Родитель
Сommit
a1189d6029

+ 55 - 7
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

@@ -266,19 +266,66 @@ namespace CallCenterApi.Interface.Controllers.knowledge
266 266
 
267 267
         public ActionResult GetDeductLsit(int infoid = 0,int deptid=0)
268 268
         {
269
+            string strstarttime = HttpUtility.UrlDecode(RequestString.GetQueryString("starttime"));
270
+            string strendtime = HttpUtility.UrlDecode(RequestString.GetQueryString("endtime"));
271
+            string strkey = HttpUtility.UrlDecode(RequestString.GetQueryString("key"));
272
+            string knowledgekey = HttpUtility.UrlDecode(RequestString.GetQueryString("knowledgekey"));
273
+            DataTable dt = new DataTable();
274
+            string strpageindex = RequestString.GetQueryString("page");
275
+            int pageindex = 1;
276
+            string strpagesize = RequestString.GetQueryString("pagesize");
277
+            int pagesize = 10;
269 278
             string sql = "";
270
-             if (infoid>0)
279
+            if (infoid > 0)
271 280
             {
272
-                sql += "and F_RepositoryId= '" + infoid+"'";
281
+                sql += "and F_RepositoryId= '" + infoid + "'";
273 282
             }
274
-            if (User .F_RoleCode =="WLDW")
283
+            if (User.F_RoleCode == "WLDW")
275 284
             {
276
-                sql += "and F_Expand1= '" + User .F_DeptId  + "'";
285
+                sql += "and F_Expand1= '" + User.F_DeptId + "'";
277 286
             }
278
-          
279
-            List<Model.T_RepositoryLog> logList = new BLL.T_RepositoryLog().GetModelList(" 1=1 and F_Action=4 ");
287
+            else if (deptid>0)
288
+            {
289
+                sql += "and F_Expand1= '" + deptid + "'";
290
+            }
291
+
280 292
 
281
-            return Success("获取成功", logList);
293
+            if (strstarttime.Trim() != "" && strstarttime != "undefined")
294
+            {
295
+                sql += " and F_CreateOn >=  '" + strstarttime + "'";
296
+            }
297
+            if (strendtime.Trim() != "" && strendtime != "undefined")
298
+            {
299
+                sql += " and F_CreateOn <=  '" + strendtime + "'";
300
+            }
301
+            if (strkey.Trim() != "" && strkey != "undefined")
302
+            {
303
+                sql += " and F_Content  like '%" + strkey + "%'";
304
+            }
305
+            if (knowledgekey.Trim() != "" && knowledgekey != "undefined")
306
+            {
307
+                sql += " and    F_RepositoryId in (select F_RepositoryId from  T_RepositoryInformation  where  F_Content like '%" + knowledgekey + "%')  ";
308
+            }
309
+
310
+            int recordCount = 0;
311
+            dt = BLL.PagerBLL.GetListPager(
312
+                "T_RepositoryLog",
313
+                "F_LogId",
314
+                "*",
315
+                sql,
316
+                "ORDER BY F_LogId desc",
317
+                pagesize,
318
+                pageindex,
319
+                true,
320
+                out recordCount);
321
+
322
+            var obj = new
323
+            {
324
+                rows = dt,
325
+                total = recordCount
326
+            };
327
+            return Content(obj.ToJson());
328
+         
282 329
         }
283 330
         [Authority]
284 331
         //扣除分值
@@ -566,6 +613,7 @@ namespace CallCenterApi.Interface.Controllers.knowledge
566 613
                 logModel.F_Title = rmodel.F_Title;
567 614
                 logModel.F_Content = User.F_UserCode +"扣分"+Math .Abs ((float )rmodel.F_Score )+
568 615
                     ",扣分原因:"+ rmodel.F_Reason ;
616
+                logModel.F_Expand2  = rmodel.F_Content;
569 617
                 var demandsModel = new BLL.T_Repository_List_Demands().GetModelList
570 618
                      ("F_RepositoryId='" + rmodel.F_RepositoryId + "' and F_IsDelete=0");
571 619
                 try