Przeglądaj źródła

fix:角色问题以及知识库报错问题

weieryang 3 lat temu
rodzic
commit
16284d322d

+ 11 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/UserAccountController.cs

@@ -466,9 +466,19 @@ namespace CallCenterApi.Interface.Controllers
466 466
         public ActionResult GetUsersList(string rolecode)
467 467
         {
468 468
             var sql = " 1=1 ";
469
+
469 470
             if (!string.IsNullOrWhiteSpace(rolecode.Trim()))
470 471
             {
471
-                string F_RoleId = DbHelperSQL.GetSingle("select F_RoleId from T_Sys_RoleInfo with(nolock) where F_RoleCode='" + rolecode.Trim() + "'")?.ToString() ?? "0";
472
+                string F_RoleId = "";
473
+                Regex reg = new Regex("^[0-9]*$");
474
+                if (reg.IsMatch(rolecode.Trim()))
475
+                {
476
+                    F_RoleId = rolecode.Trim();
477
+                }
478
+                else
479
+                {
480
+                    F_RoleId = DbHelperSQL.GetSingle("select F_RoleId from T_Sys_RoleInfo with(nolock) where F_RoleCode='" + rolecode.Trim() + "'")?.ToString() ?? "0";
481
+                }
472 482
 
473 483
                 sql += " and F_RoleId = " + F_RoleId;
474 484
             }

+ 3 - 3
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/knowledge/KnowledgeController.cs

@@ -51,15 +51,15 @@ namespace CallCenterApi.Interface.Controllers.knowledge
51 51
             }
52 52
             if (content != null && content.Trim() != "")
53 53
             {
54
-                sql += " and F_Content like '%" + content.Trim() + "%'";
54
+                sql += " and F_Description like '%" + content.Trim() + "%'";
55 55
             }
56 56
             if (pid != null && pid.Trim() != "")
57 57
             {
58 58
                 sql += " and F_CategoryId=" + pid.Trim();
59 59
             }
60
-                                                                                                                                                                                                 if (keywords != null && keywords.Trim() != "")
60
+                                                                                                                                                                                     if (keywords != null && keywords.Trim() != "")
61 61
             {
62
-                sql += " and (F_Content like '%" + keywords.Trim() + "%' or F_Title like '%"
62
+                sql += " and (F_Description like '%" + keywords.Trim() + "%' or F_Content like '%" + keywords.Trim() + "%' or F_Title like '%"
63 63
                                                                                                                                                                                                  + keywords.Trim() + "%' or F_KeyWords like '%" + keywords.Trim() + "%')";
64 64
             }
65 65
             if (strpageindex.Trim() != "")

+ 1 - 1
CallCenterApi/CallCenterApi.Interface/CallCenterApi.Interface/Controllers/workorder/WorkOrderController.cs

@@ -427,7 +427,7 @@ namespace CallCenterApi.Interface.Controllers.workorder
427 427
                     if (newusercode.Trim() != "" && newusercode != "undefined")
428 428
                     {
429 429
                         sql += " and F_WorkOrderId in (select F_WorkOrderId   from T_Bus_RemindRecord " +
430
-                             "where F_State != 2  and F_IsDelete = 0 and F_Type = 1 and Supervisor  = '" + newusercode + "') ";
430
+                             "where F_State != 2  and F_IsDelete = 0 and F_Type = 1 and Supervisor  = " + newusercode + ") ";
431 431
                     }
432 432
                 }
433 433
             }