瀏覽代碼

修改前内容,修改后内容对比详情接口 2

lihai 7 年之前
父節點
當前提交
ba6323d4c4

+ 12 - 4
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

@@ -10,7 +10,7 @@ using System.Web.Mvc;
10 10
 
11 11
 namespace CallCenterApi.Interface.Controllers.knowledge
12 12
 {
13
-    [Authority]
13
+    //[Authority]
14 14
     public class KnowledgeController : BaseController
15 15
     {
16 16
         BLL.T_RepositoryInformation infoBLL = new BLL.T_RepositoryInformation();
@@ -298,16 +298,20 @@ namespace CallCenterApi.Interface.Controllers.knowledge
298 298
                 var preContent = ""; var afterContent = "";
299 299
                 var predis = ""; var afterdis = "";
300 300
                 var title = ""; var ptitle = ""; var atitle = "";
301
-                int categoryid = 0, aftercategoryid = 0;
301
+                var categoryname = "";var aftercategoryname = "";
302
+                int categoryid = 0; int aftercategoryid = 0;
302 303
                 if (model.F_PreLogID != null)
303 304
                 {
304 305
                     Model.T_RepositoryLog logModel = logList.Where(y => y.F_LogId == model.F_PreLogID.Value).FirstOrDefault();
305 306
                     if (logModel != null)
306 307
                     {
308
+                        //分类
309
+                        var modelcategory = listcategory.FirstOrDefault(x => x.F_CategoryId == logModel.F_IntExpand1);
307 310
                         preContent = logModel.F_Content;
308 311
                         predis = logModel.F_Description;
309 312
                         ptitle = logModel.F_Title;
310 313
                         categoryid = logModel.F_IntExpand1 ?? 0;
314
+                        categoryname = modelcategory != null ? modelcategory.F_CategoryName : "";
311 315
                     }
312 316
                 }
313 317
                 if (model.F_AfterLogID != null)
@@ -315,14 +319,16 @@ namespace CallCenterApi.Interface.Controllers.knowledge
315 319
                     Model.T_RepositoryLog logModel = logList.Where(y => y.F_LogId == model.F_AfterLogID.Value).FirstOrDefault();
316 320
                     if (logModel != null)
317 321
                     {
322
+                        //分类
323
+                        var modelcategory = listcategory.FirstOrDefault(x => x.F_CategoryId == logModel.F_IntExpand1);
318 324
                         afterContent = logModel.F_Content;
319 325
                         afterdis = logModel.F_Description;
320 326
                         atitle = logModel.F_Title;
321 327
                         aftercategoryid = logModel.F_IntExpand1 ?? 0;
328
+                        aftercategoryname = modelcategory != null ? modelcategory.F_CategoryName : "";
322 329
                     }
323 330
                 }
324
-                //分类
325
-                var modelcategory= listcategory.FirstOrDefault(x=>x.F_CategoryId == model.)
331
+                
326 332
                 //if (ptitle != "")
327 333
                 //{ title = ptitle; }
328 334
                 //else { title = atitle; }
@@ -331,10 +337,12 @@ namespace CallCenterApi.Interface.Controllers.knowledge
331 337
                     F_AuditId = model.F_AuditId,
332 338
                     F_Action = model.F_Action,
333 339
                     F_CategoryId = categoryid,
340
+                    F_CategoryName = categoryname,
334 341
                     F_Title = ptitle,
335 342
                     F_PreContent = preContent,
336 343
                     F_PreDescription = predis,
337 344
                     F_AfterCategoryId = aftercategoryid,
345
+                    F_AfterCategoryName = aftercategoryname,
338 346
                     F_AfterTitle = atitle,
339 347
                     F_AfterContent = afterContent,
340 348
                     F_AfterDescription = afterdis,